This commit is contained in:
he
2022-05-17 13:14:50 +08:00
parent 4f99de69b5
commit 12a0812bcd
5 changed files with 77 additions and 9 deletions
@@ -67,7 +67,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
public Guid TrialId { get; set; }
public Guid SiteId { get; set; }
public Guid UserId { get; set; }
public DateTime? CreateTime { get; set; } = DateTime.Now;
public string UserRealName { get; set; } = String.Empty;
}
@@ -288,9 +288,9 @@ namespace IRaCIS.Core.Application.Services
{
var addArray = _mapper.Map<List<TrialSiteUser>>(trialSiteCRCList);
await _repository.AddRangeAsync(addArray);
await _trialSiteUserRepository.AddRangeAsync(addArray);
return ResponseOutput.Result(await _repository.SaveChangesAsync());
return ResponseOutput.Result(await _trialSiteUserRepository.SaveChangesAsync());
}
/// <summary> 删除CRC人员</summary>
@@ -300,8 +300,8 @@ namespace IRaCIS.Core.Application.Services
{
var isSuccess = await _trialSiteUserRepository.BatchUpdateNoTrackingAsync(u => u.Id == id, u => new TrialSiteUser()
{ IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null });
var isSuccess = await _trialSiteUserRepository.UpdatePartialFromQueryAsync(id, u => new TrialSiteUser()
{ IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null },true);
return ResponseOutput.Ok(isSuccess);
}