Browse Source

fix:商机情报消息推送清空未读消息数

duxin 1 năm trước cách đây
mục cha
commit
1b6da22f6f
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      rpc/internal/common/task.go

+ 5 - 0
rpc/internal/common/task.go

@@ -5,6 +5,7 @@ import (
 	"app.yhyue.com/moapp/MessageCenter/rpc/internal/config"
 	"app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jybase/redis"
 	"context"
 	"fmt"
 	"github.com/robfig/cron/v3"
@@ -224,4 +225,8 @@ func UpdateBatch(ids []string, msgLogId []int64) {
 		log.Printf("批量更新message_user_summary出错:%s", err1)
 		return
 	}
+	for _, id := range ids {
+		keyString := fmt.Sprintf(MsgCountKey, id, 5)
+		redis.Del(redisModule, keyString)
+	}
 }