public async Task <ResultModel> EditUserAsync(EditUserRequestModel requestModel) { var model = _mapper.Map <EditUserModel>(requestModel); await _userService.EditUserAsync(model); return(ResultModel.Success("修改成功")); }
public async Task <IActionResult> EditRoomAsync(EditUserRequestModel model) { try { var resp = await _userService.EditUserAsync(model); return(Ok(resp)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
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)); } }
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)); } }
public async Task <ResultModel> EditUserAsync(EditUserRequestModel requestModel) { var resultModel = await SendPutAsync <ResultModel>($"{_controllerUrl}EditUser", requestModel); return(resultModel); }
public ApiResultModel <int> Edit(EditUserRequestModel requestModel) { throw new System.NotImplementedException(); }