package logic import ( "app.yhyue.com/moapp/jybase/common" "context" "jyBXBase/rpc/bxcollection/bxcol" "jyBXBase/api/internal/svc" "jyBXBase/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type CheckSearchLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewCheckSearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CheckSearchLogic { return &CheckSearchLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *CheckSearchLogic) CheckSearch(req *types.AddSearch) (resp *types.CommonRes, err error) { // todo: add your logic here and delete this line res, err0 := l.svcCtx.Bxcollection.CheckSearch(l.ctx, &bxcol.AddSearchReq{ UserId: req.UserId, Type: req.Type, Keywords: req.Keywords, PublishTime: req.Publishtime, Area: req.Area, City: req.City, Subtype: req.Subtype, MinPrice: req.Minprice, MaxPrice: req.Maxprice, Industry: req.Industry, SelectType: req.SelectType, BuyerClass: req.Buyerclass, HasBuyerTel: req.Hasbuyertel, HasWinnerTel: req.Haswinnertel, FileExists: req.FileExists, NotKey: req.Notkey, TabularFlag: req.Tabularflag, }) if err0 != nil { return &types.CommonRes{ Err_code: -1, Err_msg: "错误", Data: nil, }, nil } return &types.CommonRes{ Err_code: common.IntAll(res.ErrCode), Err_msg: res.ErrMsg, Data: nil, }, nil }