Quellcode durchsuchen

Merge branch 'dev/v1.1.26_fuwencai' of BaseService/jyMicroservices into feature/v1.1.26

fuwencai vor 2 Jahren
Ursprung
Commit
eb131de3cd

+ 2 - 2
jyBXBuyer/rpc/internal/logic/buyerlistlogic.go

@@ -63,8 +63,8 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
 					end := in.PageSize * in.PageNum
 					count := len(list)
 					resp.Data.Count = int64(count)
-					if end > int64(len(list)-1) {
-						end = int64(len(list) - 1)
+					if end > int64(len(list)) {
+						end = int64(len(list))
 					}
 					resp.Data.List = list[start:end]
 					for i := 0; i < len(resp.Data.List); i++ {

+ 2 - 2
jyBXBuyer/rpc/model/buyerListBYEs.go

@@ -292,8 +292,8 @@ func BuyerListRedisCache(query string, in *bxbuyer.BuyerListReq) (buyerNames []s
 	start := in.PageSize * (in.PageNum - 1)
 	end := in.PageSize * in.PageNum
 	resp.Data.Count = int64(len(saveBuyerList))
-	if end > int64(len(saveBuyerList)-1) {
-		end = int64(len(saveBuyerList) - 1)
+	if end > int64(len(saveBuyerList)) {
+		end = int64(len(saveBuyerList))
 	}
 	resp.Data.List = saveBuyerList[start:end]
 	logx.Info("空搜索整体耗时;", time.Since(t1).Seconds(), "秒--", time.Since(t1).Microseconds())