package logic import ( "context" "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/rpc/datasmt" "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/api/internal/svc" "jygit.jydev.jianyu360.cn/ApplicationCenter/publicService/api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type DatasmtDetailLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewDatasmtDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DatasmtDetailLogic { return &DatasmtDetailLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *DatasmtDetailLogic) DatasmtDetail(req *types.DatasmtReqDetail) (resp *types.CommonResp, err error) { // todo: add your logic here and delete this line res, err := l.svcCtx.PublicService.Detail(l.ctx, &datasmt.DatasmtReqDetail{ Id: req.Id, }) if err != nil { return &types.CommonResp{ Err_code: -1, Err_msg: "错误", Data: nil, }, nil } return &types.CommonResp{ Data: res, }, nil }