package logic import ( "context" "fmt" "bp.jydev.jianyu360.cn/BaseService/goodsCenter/rpc/pb" "bp.jydev.jianyu360.cn/BaseService/goodsCenter/api/internal/svc" "bp.jydev.jianyu360.cn/BaseService/goodsCenter/api/internal/types" . "bp.jydev.jianyu360.cn/BaseService/goodsCenter/public/service" "github.com/zeromicro/go-zero/core/logx" ) type GetBaseGoodsStandClassifyLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewGetBaseGoodsStandClassifyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetBaseGoodsStandClassifyLogic { return &GetBaseGoodsStandClassifyLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *GetBaseGoodsStandClassifyLogic) GetBaseGoodsStandClassify(req *types.BaseGoodsClassifyReq) (resp *types.Reply, err error) { // todo: add your logic here and delete this line resp = &types.Reply{} list, err := GoodsCenterRpc.GetBaseGoodsStandClassify(l.ctx, &pb.ClassifyReq{ Appid: req.AppId, }) if err != nil { resp.Error_msg = err.Error() resp.Error_code = 0 l.Error(fmt.Sprintf("%+v", req), resp.Error_msg) } resp.Error_code = 1 resp.Data = list return }