|
@@ -280,16 +280,21 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
|
|
|
} else if spqp.IsEmpty() && (spqp.PageNum-1)*spqp.PageSize < 200 && len(spqp.SelectInfoIds) == 0 && !spqp.Export { //全部,没有过滤条件 之前缓存5页*50条=250 非数据导出
|
|
|
allCache := &SubPush{}
|
|
|
var err error
|
|
|
- if spqp.IsEnt == false {
|
|
|
+ if !spqp.IsEnt {
|
|
|
allCache, err = s.GetAllCache(spqp.UserId)
|
|
|
}
|
|
|
if err != nil {
|
|
|
logx.Info(spqp.UserId, "GetAllCache Error", err)
|
|
|
}
|
|
|
if err != nil || allCache == nil || allCache.Date != nowFormat || len(allCache.Datas) == 0 {
|
|
|
- spqp.PageNum = 1
|
|
|
- logx.Info(1111)
|
|
|
- list, countSearch := s.getDatasFromMysql(spqp, starttime, endtime, AllSubPushCacheSize, true)
|
|
|
+ list, countSearch := []*bxsubscribe.SubscribeInfo{}, int64(0)
|
|
|
+ if spqp.IsEnt {
|
|
|
+ list, countSearch = s.getDatasFromMysql(spqp, starttime, endtime, spqp.PageSize, true)
|
|
|
+ } else {
|
|
|
+ spqp.PageNum = 1
|
|
|
+ list, countSearch = s.getDatasFromMysql(spqp, starttime, endtime, AllSubPushCacheSize, true)
|
|
|
+
|
|
|
+ }
|
|
|
allCache = &SubPush{
|
|
|
Date: nowFormat,
|
|
|
Datas: list,
|