package logic import ( "context" "jyBXSubscribe/rpc/type/bxsubscribe" "jyBXSubscribe/api/internal/svc" "jyBXSubscribe/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type ByPushHistoryLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewByPushHistoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ByPushHistoryLogic { return &ByPushHistoryLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *ByPushHistoryLogic) ByPushHistory(req *types.SubscribeReq) (resp *types.CommonResp, err error) { res, err := l.svcCtx.Suscribe.ByPushHistory(l.ctx, &bxsubscribe.SubscribeInfosReq{ PageNum: req.PageNum, PageSize: req.PageSize, SelectTime: req.SelectTime, Area: req.Area, City: req.City, Industry: req.Industry, BuyerClass: req.BuyerClass, KeyWords: req.KeyWords, Subtype: req.Subtype, UserType: req.UserType, Price: req.Price, FileExists: req.FileExists, UserId: req.UserId, EntId: req.EntId, EntUserId: req.EntUserId, DeptId: req.DeptId, NewUserId: req.NewUserId, IsEnt: req.IsEnt, SelectIds: req.SelectIds, }) if err != nil { return &types.CommonResp{ Err_code: res.ErrorCode, Err_msg: res.ErrorMsg, Data: nil, }, nil } return &types.CommonResp{ Err_code: res.ErrorCode, Err_msg: res.ErrorMsg, Data: res.Data, }, nil return }