feat-IRONFANS-212-Robin #862
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue