Пример #1
0
        public async Task <ResultModel> EditUserAsync(EditUserRequestModel requestModel)
        {
            var model = _mapper.Map <EditUserModel>(requestModel);
            await _userService.EditUserAsync(model);

            return(ResultModel.Success("修改成功"));
        }
Пример #2
0
        public async Task <IActionResult> EditRoomAsync(EditUserRequestModel model)
        {
            try
            {
                var resp = await _userService.EditUserAsync(model);

                return(Ok(resp));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Пример #3
0
        public async Task <ResultModel> EditUser(EditUserRequestModel requestModel)
        {
            try
            {
                var model = _mapper.Map <EditUserModel>(requestModel);
                await _userService.EditUserAsync(model);

                return(ResultModel.Success("修改成功"));
            }
            catch (InvalidOperationException ex)
            {
                return(ResultModel.Fail(ex.Message));
            }
        }
Пример #4
0
        public async Task <ResultModel> EditUser(EditUserRequestModel requestModel)
        {
            try
            {
                var model = _mapper.Map <EditUserModel>(requestModel);
                await _userService.EditUserAsync(model);

                return(ResultModel.Success("修改成功"));
            }
            catch (AspectInvocationException ex)
            {
                return(ResultModel.Fail(ex.InnerException?.Message));
            }
            catch (MateralConfigCenterException ex)
            {
                return(ResultModel.Fail(ex.Message));
            }
        }
Пример #5
0
        public async Task <ResultModel> EditUserAsync(EditUserRequestModel requestModel)
        {
            var resultModel = await SendPutAsync <ResultModel>($"{_controllerUrl}EditUser", requestModel);

            return(resultModel);
        }
Пример #6
0
 public ApiResultModel <int> Edit(EditUserRequestModel requestModel)
 {
     throw new System.NotImplementedException();
 }