package logic import ( "context" "jyBXSubscribe/api/internal/svc" "jyBXSubscribe/api/internal/types" "jyBXSubscribe/rpc/type/bxsubscribe" "github.com/zeromicro/go-zero/core/logx" ) type DeriveDelLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewDeriveDelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeriveDelLogic { return &DeriveDelLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *DeriveDelLogic) DeriveDel(req *types.DeriveReq) (resp *types.CommonResp, err error) { res, err := l.svcCtx.Suscribe.DeriveDel(l.ctx, &bxsubscribe.DeriveReq{ InfoId: req.InfoId, }) if err != nil { return &types.CommonResp{ Err_code: res.ErrorCode, Err_msg: res.ErrorMsg, Data: nil, }, nil } return &types.CommonResp{ Err_code: res.ErrorCode, Err_msg: res.ErrorMsg, Data: res.Status, }, nil return }