|
@@ -39,8 +39,8 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
|
|
|
if in.PageNum < 1 {
|
|
|
in.PageNum = 1
|
|
|
}
|
|
|
- if in.PageSize < 1 || in.PageSize > 100 {
|
|
|
- in.PageSize = 10
|
|
|
+ if in.PageSize < 1 || in.PageSize > IC.C.BuyerSearchLimit {
|
|
|
+ in.PageSize = IC.C.BuyerSearchLimit / in.PageNum
|
|
|
}
|
|
|
query, CountQuery := "", ""
|
|
|
buyerNames := []string{}
|
|
@@ -54,7 +54,7 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
|
|
|
isBool = true
|
|
|
logx.Info("获取redis缓存,序列化异常")
|
|
|
} else {
|
|
|
- if len(list) > 0 {
|
|
|
+ if len(list) >= int(in.PageSize*in.PageNum) {
|
|
|
// 根据页码返回数据
|
|
|
start := in.PageSize * (in.PageNum - 1)
|
|
|
end := in.PageSize * in.PageNum
|