/// <summary> /// 修改提现 /// </summary> public async Task UpdateAsync(OutCashUpdateRequest request) { var entity = await OutCashRepository.FindAsync(request.OutCashId); request.MapTo(entity); await OutCashRepository.UpdateAsync(entity); await UnitOfWork.CommitAsync(); }
public async Task <IActionResult> UpdateAsync(string id, [FromBody] OutCashUpdateRequest request) { if (request == null) { return(Fail(WebResource.UpdateRequestIsEmpty)); } if (id.IsEmpty() && request.OutCashId.IsEmpty()) { return(Fail(WebResource.IdIsEmpty)); } if (request.OutCashId.IsEmpty()) { request.OutCashId = id.ToGuid(); } await OutCashService.UpdateAsync(request); OutCashDto byIdAsync = await OutCashService.GetByIdAsync(request.OutCashId); return(Success(byIdAsync)); }