feat-IRONFANS-212-Robin #862

Merged
chenhao merged 2 commits from feat-IRONFANS-212-Robin into test 2024-12-03 16:50:35 +08:00
1 changed files with 8 additions and 23 deletions
Showing only changes of commit 06aa01e595 - Show all commits

View File

@ -134,18 +134,6 @@ func (s *NotifBcstCenter) pushNotifsToMids(ctx *gin.Context, nids []int64, objMi
return err
}
// 记录未读总数
for _, mid := range objMids {
for nType, total := range nTypeTotalMap {
// 以真更新的条数incr
err = DefaultService.utilIncrUrc(mid, nType, total)
if err != nil {
logger.Error("utilIncrUrc fail, err: %v", err)
return err
}
}
}
return nil
}
@ -239,17 +227,6 @@ func (s *NotifBcstCenter) pullAllBcstedNotifs(ctx *gin.Context, vers, receiveVer
return err
}
// 记录未读总数
for nType, total := range nTypeTotalMap {
// 以真更新的条数incr
err = DefaultService.utilIncrUrc(objMid, nType, total)
if err != nil {
logger.Error("utilIncrUrc fail, err: %v", err)
return err
}
}
return nil
}
@ -295,6 +272,14 @@ func (s *NotifBcstCenter) bcstThroughWebsocket(ctx *gin.Context, nids []int64, o
func (s *NotifBcstCenter) bcstToMidsThroughWebsocket(ctx *gin.Context, notif *dbstruct.Notification, urc int64, objMids []int64) error {
for _, mid := range objMids {
// 先更新未读总数
err := DefaultService.utilIncrUrc(mid, notif.GetNType(), urc)
if err != nil {
logger.Error("utilIncrUrc fail, err: %v", err)
return err
}
total, _ := redis.GetRedisClient().GetInt64(util.GetNotifUrcTotalIdForRedis(mid))
param := &firenzeproto.SendBizMsgParam{
Mid: mid,