Răsfoiți Sursa

分页数据做成活的

WH01243 2 ani în urmă
părinte
comite
092b1e92ac
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      jyBXSubscribe/rpc/model/push.go

+ 2 - 2
jyBXSubscribe/rpc/model/push.go

@@ -28,7 +28,7 @@ import (
 //
 const (
 	pageSize            = 100
-	AllSubPushCacheSize = 250
+	AllSubPushCacheSize = 500
 	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext"],"from":0,"size":%d}`
 	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1}`
 
@@ -267,7 +267,7 @@ func (s *subscribePush) Datas(spqp *SubPushQueryParam) (hasNextPage bool, total
 			result = subPush.Datas[start:end]
 		}
 		total = int64(length)
-	} else if spqp.IsEmpty() && (spqp.PageNum-1)*spqp.PageSize < 250 { //全部,没有过滤条件 之前缓存5页*50条=250
+	} else if spqp.IsEmpty() && (spqp.PageNum-1)*spqp.PageSize < 500 { //全部,没有过滤条件 之前缓存500
 		logx.Info("a2:", s.allKey(spqp.UserId))
 		allCache := &SubPush{}
 		var err error