|
@@ -3,7 +3,6 @@ package logic
|
|
|
import (
|
|
|
"context"
|
|
|
"jyInfo/rpc/consumer/consumer"
|
|
|
- "strings"
|
|
|
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
|
|
@@ -28,18 +27,6 @@ func NewSupplySearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Supp
|
|
|
}
|
|
|
|
|
|
func (l *SupplySearchLogic) SupplySearch(req *types.PubSupplyInfoReq) (resp *types.CommonRes, err error) {
|
|
|
- //默认每页五十条
|
|
|
- if req.PageSize == 0 {
|
|
|
- req.PageSize = 50
|
|
|
- }
|
|
|
- //默认第一页
|
|
|
- if req.PageIndex == 0 {
|
|
|
- req.PageIndex = 1
|
|
|
- }
|
|
|
- //空格多个关键词
|
|
|
- if strings.Contains(req.Keywords, "+") {
|
|
|
- req.Keywords = strings.ReplaceAll(req.Keywords, " ", "+")
|
|
|
- }
|
|
|
supplySearch, err0 := l.svcCtx.Consumer.SupplyInfoSearch(l.ctx, &consumer.SupplyInfoSearchReq{
|
|
|
Keywords: req.Keywords,
|
|
|
SearchType: req.SearchType,
|