by Robin at 20241127

This commit is contained in:
Robin 2024-11-27 13:19:54 +08:00
parent 5a4ec5bffa
commit f03238d753
3 changed files with 30 additions and 3 deletions

View File

@ -12,6 +12,7 @@ const (
CtrlNotifTemp_SyncNotifBcstVersForUser = 1732523322 // 同步用户广播版本号
CtrlNotifTemp_SyncNotifBcstVersForStreamer = 1732523323 // 同步主播广播版本号
SysNotifTemp_FirstLogin = 1732523324 // 首次登录
SysNotifTemp_CommunityRules = 1732683742 // 社区公约
SysNotifTemp_StreamerPunished = 1732523325 // 主播封禁
SysNotifTemp_StreamerPunishmentEnds = 1732523326 // 主播封禁结束
SysNotifTemp_PswdChanged = 1732523327 // 修改密码

View File

@ -169,7 +169,7 @@ func (s *Service) ApiLoginByVeriCode(ctx *gin.Context, req *loginproto.ApiLoginB
}
// 写入自动发送消息的标签
DefaultNotifBuilderHandler.Handle(ctx)(
consts.SysNotifTemp_FirstLogin, consts.CtrlNotifTemp_SyncNotifBcstVersForUser)(account)
consts.SysNotifTemp_FirstLogin, consts.SysNotifTemp_CommunityRules, consts.CtrlNotifTemp_SyncNotifBcstVersForUser)(account)
} else if ec != errcode.ErrCodeLoginSrvOk {
return
}

View File

@ -48,6 +48,7 @@ func (handler *NotifBuilderHandler) init() {
handler.handleSyncNotifBcstVersForUser()
handler.handleSyncNotifBcstVersForStreamer()
handler.handleSysFirstLogin()
handler.handleSysCommunityRules()
handler.handleSysStreamerPunished()
handler.handleSysStreamerPunishmentEnds()
handler.handleSysPswdChanged()
@ -56,6 +57,7 @@ func (handler *NotifBuilderHandler) init() {
handler.handleSysZoneCreated()
handler.handleSysZoneVasUpdated()
handler.handleSysZoneThirdPartnerCreated()
handler.handleSysMembershipPurchased()
// 注册审核通知处理
handler.handleAudAvatarChangeApplied()
handler.handleAudNameChangeApplied()
@ -90,6 +92,23 @@ func (handler *NotifBuilderHandler) init() {
handler.handleAudZoneMomentReedited()
handler.handleAudZoneMomentReeditionPassed()
handler.handleAudZoneMomentReeditionRejected()
// 注册付费通知结果
handler.handleVasMembershipPurchased()
handler.handleWithdrawalFinished()
handler.handleVasZoneAdmissionPurchased_User()
handler.handleVasZoneAdmissionPurchased_Streamer()
handler.handleVasZoneSuperfanshipPurchased_User()
handler.handleVasZoneSuperfanshipPurchased_WxNotGifted()
handler.handleVasZoneSuperfanshipPurchased_WxPublic()
handler.handleVasZoneSuperfanshipPurchased_WxPrivate()
handler.handleVasZoneMomentPurchased_User()
handler.handleVasZoneMomentPurchased_Streamer()
handler.handleVasZoneIronfanshipUnlocked_User()
handler.handleVasZoneIronfanshipUnlocked_Streamer()
handler.handleVasWxPurchased_User_WxPublic()
handler.handleVasWxPurchased_User_WxPrivate()
handler.handleVasWxPurchased_Streamer_WxPublic()
handler.handleVasWxPurchased_Streamer_WxPrivate()
}
func (handler *NotifBuilderHandler) GetVasNotifScenes(key string) func(args ...any) []int64 {
@ -132,6 +151,13 @@ func (handler *NotifBuilderHandler) handleSysFirstLogin() {
}
}
func (handler *NotifBuilderHandler) handleSysCommunityRules() {
handler.handlerMap[consts.SysNotifTemp_CommunityRules] = func(ctx *gin.Context, args ...any) {
account := args[0].(*dbstruct.Account)
DefaultService.utilWriteNotifInfo(ctx, consts.SysNotifTemp_CommunityRules, account.GetMid())
}
}
func (handler *NotifBuilderHandler) handleSyncNotifBcstVersForUser() {
handler.handlerMap[consts.CtrlNotifTemp_SyncNotifBcstVersForUser] = func(ctx *gin.Context, args ...any) {
account := args[0].(*dbstruct.Account)
@ -563,7 +589,7 @@ func (handler *NotifBuilderHandler) handleAudZoneMomentRejected() {
argsMap["hyperlinks"] = hyperlinks
argsMap["thumbnail"] = preview
DefaultService.utilWriteNotifInfoByMap(ctx, consts.SysNotifTemp_ZoneCreated, zonemoment.GetMid(), argsMap)
DefaultService.utilWriteNotifInfoByMap(ctx, consts.AudNotifTemp_ZoneMomentRejected, zonemoment.GetMid(), argsMap)
}
}
@ -641,7 +667,7 @@ func (handler *NotifBuilderHandler) handleAudZoneMomentReeditionRejected() {
argsMap["hyperlinks"] = hyperlinks
argsMap["thumbnail"] = preview
DefaultService.utilWriteNotifInfoByMap(ctx, consts.SysNotifTemp_ZoneCreated, zonemoment.GetMid(), argsMap)
DefaultService.utilWriteNotifInfoByMap(ctx, consts.AudNotifTemp_ZoneMomentReeditionRejected, zonemoment.GetMid(), argsMap)
}
}