package logic import ( "context" "jyBXSubscribe/rpc/type/bxsubscribe" "jyBXSubscribe/api/internal/svc" "jyBXSubscribe/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type ViewStatusLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewViewStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ViewStatusLogic { return &ViewStatusLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *ViewStatusLogic) ViewStatus(req *types.ViewStatusReq) (resp *types.CommonResp, err error) { // todo: add your logic here and delete this line res, err := l.svcCtx.Suscribe.GetViewStatus(l.ctx, &bxsubscribe.GetViewStatusReq{ AppId: req.AppId, EntId: req.EntId, EntUserId: req.EntUserId, InfoId: req.InfoId, }) 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, }, nil return }