|
@@ -173,9 +173,14 @@ func UserMsgList(this *message.UserMsgListReq) *message.UserMsgList {
|
|
|
// p436 处理消息细分分类要返回的数据
|
|
|
// 获取小分类下的未读数
|
|
|
sortUnread, _ := m.CountClassUnread(this.UserId, this.MsgType)
|
|
|
- columnMap := entity.ClassSearchMap[this.MsgType]
|
|
|
- for i := 0; i < len(columnMap); i++ {
|
|
|
- tmp := columnMap[i]
|
|
|
+ columnArr := []entity.MsgClass{}
|
|
|
+ if !this.IsColumnNewMsg { // 用于区分分类列表页和分类详情页 根据不同情况
|
|
|
+ columnArr = append(columnArr, entity.ClassMap[this.MsgType])
|
|
|
+ } else {
|
|
|
+ columnArr = entity.ClassSearchMap[this.MsgType]
|
|
|
+ }
|
|
|
+ for i := 0; i < len(columnArr); i++ {
|
|
|
+ tmp := columnArr[i]
|
|
|
var column message.AllSortData
|
|
|
column.Name = tmp.Name
|
|
|
column.Img = fmt.Sprintf("/common-module/msgCenter/%s.png", tmp.Img)
|
|
@@ -398,7 +403,7 @@ func MsgCountAdd(userId, appId string, msgType int64, msgClassType int64) bool {
|
|
|
func MsgCountMinusOne(userId, appId string, msgType int64, msgClassType int64) bool {
|
|
|
classKeyString := fmt.Sprintf(MsgClassCountKey, userId, msgClassType)
|
|
|
if exist, _ := redis.Exists(redisModule, classKeyString); exist {
|
|
|
- if redis.GetInt(redisModule, MsgClassCountKey) > 0 {
|
|
|
+ if redis.GetInt(redisModule, classKeyString) > 0 {
|
|
|
redis.Decrby(redisModule, classKeyString, 1)
|
|
|
}
|
|
|
}
|