|
@@ -264,7 +264,7 @@ func SaveToPushsubscribe(isVipUser, isProjectInfo bool, userId string, matchInfo
|
|
|
logger.Error(userId, "批量保存有问题", length, saveCount)
|
|
|
}
|
|
|
//更新redis
|
|
|
- subPush, err := jy.SubscribePush.Get(userId)
|
|
|
+ subPush, err := jy.SubscribePush.GetTodayCache(userId)
|
|
|
if err == nil && subPush != nil {
|
|
|
if nowymd := util.NowFormat(util.Date_Short_Layout); subPush.Date != nowymd {
|
|
|
subPush = &jy.SubPush{
|
|
@@ -275,7 +275,16 @@ func SaveToPushsubscribe(isVipUser, isProjectInfo bool, userId string, matchInfo
|
|
|
subPush_datas = append(subPush_datas, subPush.Datas...)
|
|
|
subPush.Datas = subPush_datas
|
|
|
}
|
|
|
- jy.SubscribePush.Put(userId, subPush)
|
|
|
+ jy.SubscribePush.PutTodayCache(userId, subPush)
|
|
|
+ }
|
|
|
+ //全部列表缓存
|
|
|
+ allCache, err := jy.SubscribePush.GetAllCache(userId)
|
|
|
+ if err != nil && allCache != nil {
|
|
|
+ subPush_datas = append(subPush_datas, allCache...)
|
|
|
+ if len(subPush_datas) > jy.AllSubPushCacheSize {
|
|
|
+ subPush_datas = subPush_datas[:jy.AllSubPushCacheSize]
|
|
|
+ }
|
|
|
+ jy.SubscribePush.PutAllCache(userId, subPush_datas)
|
|
|
}
|
|
|
//最近7天50条redis缓存处理
|
|
|
sevenDayCache, err := jy.SubscribePush.GetSevenDayCache(userId)
|