Pārlūkot izejas kodu

feat:限制条数配置

wangshan 3 gadi atpakaļ
vecāks
revīzija
c7d3f47ac8

+ 1 - 0
jyBXCore/rpc/etc/bxcore.yaml

@@ -30,3 +30,4 @@ PaySearchLimit:
   Month: 0
   WordSize: 7
   PageNum: 1
+  PageSize: 20

+ 1 - 0
jyBXCore/rpc/internal/config/config.go

@@ -32,6 +32,7 @@ type Config struct {
 		Month    int
 		WordSize int
 		PageNum  int64
+		PageSize int64
 	}
 }
 

+ 2 - 2
jyBXCore/rpc/internal/logic/getsearchlistlogic.go

@@ -108,8 +108,8 @@ func (l *GetSearchListLogic) GetSearchList(in *bxcore.SearchReq) (*bxcore.Search
 				in.KeyWords = strings.ReplaceAll(in.KeyWords, "+&&&", "")
 				in.PageNum = 1
 			}
-			//不够五十条 走原始查询
-			if count < util.SearchPageSize {
+			//不够配置条 走原始查询
+			if count < IC.C.PaySearchLimit.PageSize {
 				in.PublishTime = publishTime
 				count, list = util.GetBidSearchData(in)
 			}