package logic import ( "context" "jyBXSubscribe/api/internal/svc" "jyBXSubscribe/api/internal/types" "jyBXSubscribe/rpc/type/bxsubscribe" "github.com/zeromicro/go-zero/core/logx" ) type DeriveShowLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewDeriveShowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeriveShowLogic { return &DeriveShowLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *DeriveShowLogic) DeriveShow(req *types.DeriveReq) (resp *types.CommonResp, err error) { res, err := l.svcCtx.Suscribe.DeriveShow(l.ctx, &bxsubscribe.DeriveReq{ EntId: req.EntId, EntUserId: req.EntUserId, UserId: req.UserId, }) if err != nil { return &types.CommonResp{ Err_code: res.ErrCode, Err_msg: res.ErrMsg, Data: nil, }, nil } return &types.CommonResp{ Err_code: res.ErrCode, Err_msg: res.ErrMsg, Data: res.Data, }, nil return }