package logic import ( "app.yhyue.com/moapp/jyInfo/rpc/consumer/consumerinfo" "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 MyPublishListLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewMyPublishListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MyPublishListLogic { return &MyPublishListLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *MyPublishListLogic) MyPublishList(req *types.MyPublishListReq) (resp *types.CommonRes, err error) { pubList, err0 := l.svcCtx.Consumer.MyPublishList(l.ctx, &consumerinfo.MyPublishListReq{ UserId: req.UserId, AppId: req.AppId, Match: req.Match, MsgType: req.MsgType, ReviewStatus: common.Int64All(req.ReviewStatus), PageSize: common.Int64All(req.PageSize), PageIndex: common.Int64All(req.PageIndex), EntId: req.EntId, Classify: req.Classify, }) if err0 != nil { return &types.CommonRes{ Err_code: -1, Err_msg: "错误", Data: nil, }, nil } return &types.CommonRes{ Err_code: common.IntAll(pubList.ErrCode), Err_msg: pubList.ErrMsg, Data: pubList.Results, }, nil }