Jelajahi Sumber

feat:数量限制调整

fuwencai 2 tahun lalu
induk
melakukan
b0d2b7d4d9

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

@@ -54,7 +54,7 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
 				isBool = true
 				logx.Info("获取redis缓存,序列化异常")
 			} else {
-				if len(list) >= int(in.PageSize*in.PageNum) {
+				if len(list) > 0 {
 					// 根据页码返回数据
 					start := in.PageSize * (in.PageNum - 1)
 					end := in.PageSize * in.PageNum

+ 3 - 0
jyBXBuyer/rpc/model/buyerListBYEs.go

@@ -238,7 +238,10 @@ func BuyerListRedisCache(query string, in *bxbuyer.BuyerListReq) (buyerNames []s
 				redis.PutBytes("other", fmt.Sprintf(P_redis_key), &b, P_redis_time)
 			}
 		}(saveBuyerList)
+	} else {
+		return
 	}
+
 	// 根据页码返回数据
 	start := in.PageSize * (in.PageNum - 1)
 	end := in.PageSize * in.PageNum