Esempio n. 1
0
        public async Task <PageResultModel <UserListDTO> > GetUserListAsync(QueryUserFilterRequestModel requestModel)
        {
            var model = _mapper.Map <QueryUserFilterModel>(requestModel);

            (List <UserListDTO> result, PageModel pageModel) = await _userService.GetUserListAsync(model);

            return(PageResultModel <UserListDTO> .Success(result, pageModel, "查询成功"));
        }
Esempio n. 2
0
        public async Task <PageResultModel <UserListDTO> > GetUserList(QueryUserFilterRequestModel requestModel)
        {
            try
            {
                var model = _mapper.Map <QueryUserFilterModel>(requestModel);
                (List <UserListDTO> result, PageModel pageModel) = await _userService.GetUserListAsync(model);

                return(PageResultModel <UserListDTO> .Success(result, pageModel, "查询成功"));
            }
            catch (InvalidOperationException ex)
            {
                return(PageResultModel <UserListDTO> .Fail(null, null, ex.Message));
            }
        }
Esempio n. 3
0
        public async Task <PageResultModel <UserListDTO> > GetUserList(QueryUserFilterRequestModel requestModel)
        {
            try
            {
                var model = _mapper.Map <QueryUserFilterModel>(requestModel);
                (List <UserListDTO> userInfos, PageModel pageModel) = await _userService.GetUserListAsync(model);

                return(PageResultModel <UserListDTO> .Success(userInfos, pageModel, "获取成功"));
            }
            catch (MateralConDepException ex)
            {
                return(PageResultModel <UserListDTO> .Fail(ex.Message));
            }
        }
        public async Task <PageResultModel <UserListDTO> > GetUserList(QueryUserFilterRequestModel requestModel)
        {
            try
            {
                var model = _mapper.Map <QueryUserFilterModel>(requestModel);
                (List <UserListDTO> result, PageModel pageModel) = await _userService.GetUserListAsync(model);

                return(PageResultModel <UserListDTO> .Success(result, pageModel, "查询成功"));
            }
            catch (AspectInvocationException ex)
            {
                return(PageResultModel <UserListDTO> .Fail(ex.InnerException?.Message));
            }
            catch (MateralConfigCenterException ex)
            {
                return(PageResultModel <UserListDTO> .Fail(ex.Message));
            }
        }
Esempio n. 5
0
        public async Task <PageResultModel <UserListDTO> > GetUserListAsync(QueryUserFilterRequestModel requestModel)
        {
            var resultModel = await SendPostAsync <PageResultModel <UserListDTO> >($"{_controllerUrl}GetUserList", requestModel);

            return(resultModel);
        }