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 DatasmtListLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewDatasmtListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DatasmtListLogic { return &DatasmtListLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx, } } func (l *DatasmtListLogic) DatasmtList(req *types.DatasmtReqList) (resp *types.CommonResp, err error) { // todo: add your logic here and delete this line res, err := l.svcCtx.PublicService.List(l.ctx, &datasmt.DatasmtReqList{ DataType: req.DataType, SearchValue: req.SearchValue, PageSize: req.PageSize, PageNum: req.PageNum, }) if err != nil { return &types.CommonResp{ Err_code: -1, Err_msg: "错误", Data: nil, }, nil } return &types.CommonResp{ Data: res, }, nil }