修改仓储名称
This commit is contained in:
@@ -114,15 +114,15 @@ namespace IRaCIS.Core.Application
|
||||
|
||||
if (signConfirmDTO.SignCode == ((int)SignEnum.TrialLogicConfim).ToString())
|
||||
{
|
||||
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialBasicLogicConfirmed = true });
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialBasicLogicConfirmed = true });
|
||||
}
|
||||
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialProcessConfim).ToString())
|
||||
{
|
||||
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialProcessConfirmed = true });
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialProcessConfirmed = true });
|
||||
}
|
||||
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialUrgentConfim).ToString())
|
||||
{
|
||||
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialUrgentConfirmed = true });
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialUrgentConfirmed = true });
|
||||
}
|
||||
|
||||
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialQCQuestionConfirm).ToString())
|
||||
@@ -158,7 +158,7 @@ namespace IRaCIS.Core.Application
|
||||
throw new BusinessValidationFailedException("父问题的序号要比子问题序号小,请确认");
|
||||
}
|
||||
|
||||
await _trialRepository.BatchUpdateAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true });
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true });
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace IRaCIS.Core.Application
|
||||
EnrollStatus = (int)EnrollStatus.Finished
|
||||
});
|
||||
|
||||
await _trialRepository.BatchUpdateAsync(u => u.Id == trialId, s => new Trial { TrialFinishedTime = DateTime.UtcNow.AddHours(8) });
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(u => u.Id == trialId, s => new Trial { TrialFinishedTime = DateTime.UtcNow.AddHours(8) });
|
||||
|
||||
}
|
||||
|
||||
@@ -279,11 +279,9 @@ namespace IRaCIS.Core.Application
|
||||
[HttpPut("{trialId:guid}/{isAbandon:bool}")]
|
||||
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
|
||||
{
|
||||
await _trialRepository.UpdateNowNoQueryAsync(trialId, u => new Trial() { IsDeleted = isAbandon });
|
||||
|
||||
await _trialRepository.UpdatePartialFieldsNowAsync(trialId, u => new Trial() { IsDeleted = isAbandon });
|
||||
|
||||
|
||||
//var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
@@ -193,11 +193,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpDelete("{trialExternalUserId:guid}/{isSystemUser:bool}/{systemUserId}")]
|
||||
public async Task<IResponseOutput> DeleteTrialExternalUser(Guid trialExternalUserId, bool isSystemUser, Guid systemUserId)
|
||||
{
|
||||
var success = await _trialExternalUseRepository.BatchDeleteAsync(t => t.Id == trialExternalUserId);
|
||||
var success = await _trialExternalUseRepository.BatchDeleteNoTrackingAsync(t => t.Id == trialExternalUserId);
|
||||
|
||||
if (isSystemUser == false)
|
||||
{
|
||||
await _userRepository.BatchDeleteAsync(t => t.Id == systemUserId);
|
||||
await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == systemUserId);
|
||||
}
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
@@ -263,7 +263,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
smtp.MessageSent += (sender, args) =>
|
||||
{
|
||||
|
||||
_ = _trialExternalUseRepository.BatchUpdateAsync(t => t.Id == userInfo.Id, u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.HasSend, IsJoin = null, ConfirmTime = null, RejectReason = String.Empty, ExpireTime = DateTime.Now.AddDays(7) }).Result;
|
||||
_ = _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == userInfo.Id, u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.HasSend, IsJoin = null, ConfirmTime = null, RejectReason = String.Empty, ExpireTime = DateTime.Now.AddDays(7) }).Result;
|
||||
|
||||
};
|
||||
|
||||
@@ -344,7 +344,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
await _userRepository.BatchUpdateAsync(t => t.Id == sysUserInfo.Id,
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id,
|
||||
u => new User() { Password = MD5Helper.Md5(verificationCode.ToString()) });
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
await smtp.DisconnectAsync(true);
|
||||
}
|
||||
|
||||
await _userRepository.BatchUpdateAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
|
||||
}
|
||||
@@ -487,7 +487,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
await _trialSiteUserRepository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = siteId, UserId = userId });
|
||||
|
||||
await _userRepository.BatchUpdateAsync(t => t.Id == needUpdate.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == needUpdate.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
|
||||
}
|
||||
@@ -515,7 +515,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (sysUserInfo.IsFirstAdd)
|
||||
{
|
||||
await _userRepository.BatchUpdateAsync(t => t.Id == sysUserInfo.Id,
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == sysUserInfo.Id,
|
||||
u => new User() { Password = MD5Helper.Md5(verificationCode.ToString()) });
|
||||
}
|
||||
|
||||
@@ -666,10 +666,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
await _repository.AddAsync(new TrialUser() { TrialId = trialId, UserId = (Guid)externalUser.SystemUserId });
|
||||
|
||||
await _trialExternalUseRepository.BatchUpdateAsync(t => t.Id == trialExternalUserId,
|
||||
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == trialExternalUserId,
|
||||
u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed });
|
||||
|
||||
await _userRepository.BatchUpdateAsync(t => t.Id == externalUser.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == externalUser.SystemUserId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
await _userRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace IRaCIS.Application.Services
|
||||
await _repository.BatchUpdateAsync<SubjectVisit>(t => t.CurrentActionUserId == trialUser.UserId && t.TrialId == trialUser.TrialId && t.IsTake, u => new SubjectVisit() { CurrentActionUserId = null, CurrentActionUserExpireTime = null, IsTake = false });
|
||||
}
|
||||
|
||||
await _trialUseRepository.BatchUpdateAsync(t => t.Id == id, u => new TrialUser() { IsDeleted = isDelete, RemoveTime = isDelete ? DateTime.Now : null });
|
||||
await _trialUseRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new TrialUser() { IsDeleted = isDelete, RemoveTime = isDelete ? DateTime.Now : null });
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
|
||||
|
||||
@@ -438,7 +438,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
}
|
||||
|
||||
await _trialRepository.BatchUpdateAsync(u => u.Id == trialId, t => new Trial() { VisitPlanConfirmed = confirmOrCancel });
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(u => u.Id == trialId, t => new Trial() { VisitPlanConfirmed = confirmOrCancel });
|
||||
|
||||
await _repository.BatchUpdateAsync<VisitStage>(u => u.Id == trialId, t => new VisitStage() { IsConfirmed = true });
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
|
||||
|
||||
var isSuccess = await _trialSiteUserRepository.BatchUpdateAsync(u => u.Id == id, u => new TrialSiteUser()
|
||||
var isSuccess = await _trialSiteUserRepository.BatchUpdateNoTrackingAsync(u => u.Id == id, u => new TrialSiteUser()
|
||||
{ IsDeleted = isDelete, DeletedTime = isDelete ? DateTime.Now : null });
|
||||
|
||||
return ResponseOutput.Ok(isSuccess);
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
await _trialUserRepository.AddAsync(new TrialUser() { TrialId = trialId, UserId = userId });
|
||||
|
||||
|
||||
await _trialExternalUseRepository.BatchUpdateAsync(t => t.TrialId == trialId && t.SystemUserId == userId,
|
||||
await _trialExternalUseRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.SystemUserId == userId,
|
||||
u => new TrialExternalUser() { InviteState = TrialExternalUserStateEnum.UserConfirmed });
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
}
|
||||
|
||||
await _userRepository.BatchUpdateAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == userId, u => new User() { Status = UserStateEnum.Enable });
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
Reference in New Issue
Block a user