|
@@ -27,6 +27,13 @@ func NewSupplySearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Supp
|
|
|
}
|
|
|
|
|
|
func (l *SupplySearchLogic) SupplySearch(req *types.PubSupplyInfoReq) (resp *types.CommonRes, err error) {
|
|
|
+ if req.UserId == "" { //未登录用户每次搜索100条数据
|
|
|
+ req.PageIndex = common.Int64All(common.If(req.PageIndex == 0, 1, req.PageIndex))
|
|
|
+ if req.PageIndex*req.PageSize > 100 {
|
|
|
+ req.PageIndex = 1
|
|
|
+ req.PageSize = 100
|
|
|
+ }
|
|
|
+ }
|
|
|
supplySearch, err0 := l.svcCtx.Consumer.SupplyInfoSearch(l.ctx, &consumerinfo.SupplyInfoSearchReq{
|
|
|
Keywords: req.Keywords,
|
|
|
SearchType: req.SearchType,
|