Exemplo n.º 1
0
        public async Task <ResultModel <List <NamespaceListDTO> > > GetNamespaceListAsync(QueryNamespaceFilterRequestModel requestModel)
        {
            var model = _mapper.Map <QueryNamespaceFilterModel>(requestModel);
            List <NamespaceListDTO> result = await _namespaceService.GetNamespaceListAsync(model);

            return(ResultModel <List <NamespaceListDTO> > .Success(result, "查询成功"));
        }
Exemplo n.º 2
0
        public async Task <ResultModel <List <NamespaceListDTO> > > GetNamespaceList(QueryNamespaceFilterModel filterModel)
        {
            try
            {
                List <NamespaceListDTO> result = await namespaceService.GetNamespaceListAsync(filterModel);

                return(ResultModel <List <NamespaceListDTO> > .Success(result, "查询成功"));
            }
            catch (AspectInvocationException ex)
            {
                return(ResultModel <List <NamespaceListDTO> > .Fail(ex.InnerException?.Message));
            }
            catch (MateralConfigCenterException ex)
            {
                return(ResultModel <List <NamespaceListDTO> > .Fail(ex.Message));
            }
        }