package logic import ( "app.yhyue.com/moapp/jyInfo/rpc/manager/managerclient" "context" "app.yhyue.com/moapp/jybase/common" "app.yhyue.com/moapp/jyInfo/api/internal/svc" "app.yhyue.com/moapp/jyInfo/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type InfoListLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewInfoListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoListLogic { return &InfoListLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *InfoListLogic) InfoList(req *types.InfoListReq) (resp *types.CommonRes, err error) { infolist, err0 := l.svcCtx.Manager.InfoList(l.ctx, &managerclient.InfoListReq{ Phone: req.Phone, MsgType: common.Int64All(req.MsgType), PhoneType: common.Int64All(req.PhoneType), ReviewStatus: common.Int64All(req.ReviewStatus), ApplyStartTime: req.ApplyStartTime, ApplyEndTime: req.ApplyEndTime, PageSize: req.PageSize, PageIndex: req.PageIndex, IsDel: common.Int64All(req.IsDel), Published: common.Int64All(req.Published), }) if err0 != nil { return &types.CommonRes{ Err_code: -1, Err_msg: "错误", Data: nil, }, nil } return &types.CommonRes{ Err_code: common.IntAll(infolist.ErrCode), Err_msg: infolist.ErrMsg, Data: infolist.Data, }, nil }