浏览代码

翻页数据处理

WH01243 2 年之前
父节点
当前提交
377bd0d4e8
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      jyBXSubscribe/rpc/model/push.go

+ 4 - 0
jyBXSubscribe/rpc/model/push.go

@@ -274,6 +274,8 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 		}
 		if start < length {
 			result = subPush.Datas[start:end]
+		} else {
+			result = subPush.Datas
 		}
 		total = int64(length)
 		//全部,没有过滤条件 之前缓存500
@@ -310,6 +312,8 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 		}
 		if start < length {
 			result = allCache.Datas[start:end]
+		} else {
+			result = allCache.Datas
 		}
 		total = allCache.Count
 	} else {