package logic import ( "app.yhyue.com/moapp/jyMarketing/rpc/activity" "context" "app.yhyue.com/moapp/jyMarketing/api/internal/svc" "app.yhyue.com/moapp/jyMarketing/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type GetCommodityListLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewGetCommodityListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetCommodityListLogic { return &GetCommodityListLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *GetCommodityListLogic) GetCommodityList(req *types.Request) (*types.UserLotteryResp, error) { // todo: add your logic here and delete this line result := &types.UserLotteryResp{} lsi := l.svcCtx.Activity resp, _ := lsi.GetCommodityList(l.ctx, &activity.Request{ ProductCode: req.ProductCode, }) result.Data = resp.Data return result, nil }