|
@@ -5,6 +5,7 @@ import (
|
|
|
"app.yhyue.com/moapp/MessageCenter/rpc/type/message"
|
|
|
"app.yhyue.com/moapp/MessageCenter/util"
|
|
|
qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
+ "app.yhyue.com/moapp/jybase/redis"
|
|
|
"fmt"
|
|
|
"log"
|
|
|
"strconv"
|
|
@@ -78,6 +79,13 @@ func ClearUnreadMsg(in *message.ClearUnreadMsgReq) error {
|
|
|
if !entity.Mysql.Update("message", query, map[string]interface{}{"isRead": 1}) {
|
|
|
log.Println("更新服务未读数失败")
|
|
|
}
|
|
|
+ // p436 清空消息时 "msg_class_count_%s_%d" 下的消息数量也清空
|
|
|
+ for _, classes := range entity.ClassSearchMap {
|
|
|
+ for i := 0; i < len(classes); i++ {
|
|
|
+ classKeyString := fmt.Sprintf(MsgClassCountKey, in.Userid, classes[i].MsgType)
|
|
|
+ redis.Put(redisModule, classKeyString, 0, -1)
|
|
|
+ }
|
|
|
+ }
|
|
|
for _, v := range entity.MessageColumn {
|
|
|
go MsgCountZero(in.Userid, in.AppId, qutil.Int64All(v["group_id"]))
|
|
|
}
|