修改仓储名
parent
cf2f6d0651
commit
104f51779e
|
@ -93,10 +93,10 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.NotOk("The mailbox for this user type already exists");
|
return ResponseOutput.NotOk("The mailbox for this user type already exists");
|
||||||
}
|
}
|
||||||
|
|
||||||
await _userRepository.UpdatePartialFields(_userInfo.Id, u => new User()
|
await _userRepository.UpdatePartialFieldsNowAsync(_userInfo.Id, u => new User()
|
||||||
{
|
{
|
||||||
EMail = newEmail
|
EMail = newEmail
|
||||||
}, true);
|
});
|
||||||
|
|
||||||
//删除验证码历史记录
|
//删除验证码历史记录
|
||||||
await _verificationCodeRepository.BatchDeleteAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0);
|
await _verificationCodeRepository.BatchDeleteAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0);
|
||||||
|
@ -113,10 +113,10 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
await _userRepository.UpdatePartialFields(_userInfo.Id, u => new User()
|
await _userRepository.UpdatePartialFieldsNowAsync(_userInfo.Id, u => new User()
|
||||||
{
|
{
|
||||||
Phone = newPhone
|
Phone = newPhone
|
||||||
},true);
|
});
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
@ -130,10 +130,10 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("UserId already exists");
|
return ResponseOutput.NotOk("UserId already exists");
|
||||||
}
|
}
|
||||||
await _userRepository.UpdatePartialFields(_userInfo.Id, u => new User()
|
await _userRepository.UpdatePartialFieldsNowAsync(_userInfo.Id, u => new User()
|
||||||
{
|
{
|
||||||
UserName = newUserName
|
UserName = newUserName
|
||||||
},true);
|
});
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
@ -148,11 +148,11 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
public async Task<IResponseOutput> ResetPassword(Guid userId)
|
public async Task<IResponseOutput> ResetPassword(Guid userId)
|
||||||
{
|
{
|
||||||
await _userRepository.UpdatePartialFields(userId, u => new User()
|
await _userRepository.UpdatePartialFieldsNowAsync(userId, u => new User()
|
||||||
{
|
{
|
||||||
Password = MD5Helper.Md5(StaticData.DefaultPassword),
|
Password = MD5Helper.Md5(StaticData.DefaultPassword),
|
||||||
IsFirstAdd = true
|
IsFirstAdd = true
|
||||||
}, true);
|
});
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@ namespace IRaCIS.Core.Application
|
||||||
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
|
public async Task<IResponseOutput> AbandonTrial(Guid trialId, /*Guid? signId,*/ bool isAbandon)
|
||||||
{
|
{
|
||||||
|
|
||||||
await _trialRepository.UpdatePartialFields(trialId, u => new Trial() { IsDeleted = isAbandon },true);
|
await _trialRepository.UpdatePartialFieldsNowAsync(trialId, u => new Trial() { IsDeleted = isAbandon });
|
||||||
|
|
||||||
|
|
||||||
//var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
//var success = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace IRaCIS.Core.Application.Triggers
|
||||||
{
|
{
|
||||||
await UpdateSubjectVisitImageDateAsync(context.Entity.SubjectVisitId);
|
await UpdateSubjectVisitImageDateAsync(context.Entity.SubjectVisitId);
|
||||||
|
|
||||||
await _subjectVisitRepository.UpdatePartialFieldsNow(subjectVisitId, u => new SubjectVisit()
|
await _subjectVisitRepository.UpdatePartialFieldsNowAsync(subjectVisitId, u => new SubjectVisit()
|
||||||
{
|
{
|
||||||
VisitExecuted = VisitExecutedEnum.Executed
|
VisitExecuted = VisitExecutedEnum.Executed
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@ namespace IRaCIS.Core.Application.Triggers
|
||||||
{
|
{
|
||||||
await UpdateSubjectVisitImageDateAsync(subjectVisitId);
|
await UpdateSubjectVisitImageDateAsync(subjectVisitId);
|
||||||
|
|
||||||
await _subjectVisitRepository.UpdatePartialFieldsNow(subjectVisitId, u => new SubjectVisit()
|
await _subjectVisitRepository.UpdatePartialFieldsNowAsync(subjectVisitId, u => new SubjectVisit()
|
||||||
{
|
{
|
||||||
VisitExecuted = VisitExecutedEnum.Executed
|
VisitExecuted = VisitExecutedEnum.Executed
|
||||||
});
|
});
|
||||||
|
@ -84,7 +84,7 @@ namespace IRaCIS.Core.Application.Triggers
|
||||||
var minArray = new DateTime?[] { svTime.DicomStudyMinStudyTime, svTime.NoneDicomStudyMinStudyTime };
|
var minArray = new DateTime?[] { svTime.DicomStudyMinStudyTime, svTime.NoneDicomStudyMinStudyTime };
|
||||||
var maxArray = new DateTime?[] { svTime.DicomStudyMaxStudyTime, svTime.NoneDicomStudyMaxStudyTime };
|
var maxArray = new DateTime?[] { svTime.DicomStudyMaxStudyTime, svTime.NoneDicomStudyMaxStudyTime };
|
||||||
|
|
||||||
await _subjectVisitRepository.UpdatePartialFieldsNow(subjectVisitId, u => new SubjectVisit()
|
await _subjectVisitRepository.UpdatePartialFieldsNowAsync(subjectVisitId, u => new SubjectVisit()
|
||||||
{
|
{
|
||||||
|
|
||||||
EarliestScanDate = minArray.Min(),
|
EarliestScanDate = minArray.Min(),
|
||||||
|
|
|
@ -18,14 +18,14 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
Task<TEntity> UpdateFromDTOAsync<TFrom>(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp<TEntity>[] verify);
|
Task<TEntity> UpdateFromDTOAsync<TFrom>(TFrom from, bool autoSave = false, bool ignoreDtoNullProperty = true, params EntityVerifyExp<TEntity>[] verify);
|
||||||
|
|
||||||
|
|
||||||
Task<TEntity> UpdatePartialFields(TEntity entity, string[] propertyNames, bool autoSave = false, bool ignoreEntityNullProperty = true, params EntityVerifyExp<TEntity>[] verify);
|
Task<TEntity> UpdatePartialFieldsAsync(TEntity entity, string[] propertyNames, bool autoSave = false, bool ignoreEntityNullProperty = true, params EntityVerifyExp<TEntity>[] verify);
|
||||||
|
|
||||||
/// <summary>更新字段,立即提交事务</summary>
|
/// <summary>更新字段,立即提交事务</summary>
|
||||||
|
|
||||||
Task<bool> UpdatePartialFieldsNow(Guid id, Expression<Func<TEntity, TEntity>> updateFactory, params EntityVerifyExp<TEntity>[] verify);
|
Task<bool> UpdatePartialFieldsNowAsync(Guid id, Expression<Func<TEntity, TEntity>> updateFactory, params EntityVerifyExp<TEntity>[] verify);
|
||||||
|
|
||||||
/// <summary>更新字段,默认不提交事务,一般用于服务里面 和别的操作 一起提交事务</summary>
|
/// <summary>更新字段,默认不提交事务,一般用于服务里面 和别的操作 一起提交事务</summary>
|
||||||
Task UpdatePartialFields(Guid id, Expression<Func<TEntity, TEntity>> updateFactory, bool autoSave = false, params EntityVerifyExp<TEntity>[] verify);
|
Task UpdatePartialFieldsAsync(Guid id, Expression<Func<TEntity, TEntity>> updateFactory, bool autoSave = false, params EntityVerifyExp<TEntity>[] verify);
|
||||||
|
|
||||||
/// <summary>批量删除,相当于原生sql, 没用EF跟踪方式(所有查询出来,再删除 浪费性能)</summary>
|
/// <summary>批量删除,相当于原生sql, 没用EF跟踪方式(所有查询出来,再删除 浪费性能)</summary>
|
||||||
Task<bool> BatchDeleteAsync(Expression<Func<TEntity, bool>> deleteFilter);
|
Task<bool> BatchDeleteAsync(Expression<Func<TEntity, bool>> deleteFilter);
|
||||||
|
|
|
@ -460,7 +460,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
/// <param name="autoSave"></param>
|
/// <param name="autoSave"></param>
|
||||||
/// <param name="verify"></param>
|
/// <param name="verify"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task UpdatePartialFields(Guid id, Expression<Func<TEntity, TEntity>> updateFactory, bool autoSave = false, params EntityVerifyExp<TEntity>[] verify)
|
public async Task UpdatePartialFieldsAsync(Guid id, Expression<Func<TEntity, TEntity>> updateFactory, bool autoSave = false, params EntityVerifyExp<TEntity>[] verify)
|
||||||
{
|
{
|
||||||
await SetPartialFieldUpdateAsync(id, updateFactory, verify);
|
await SetPartialFieldUpdateAsync(id, updateFactory, verify);
|
||||||
|
|
||||||
|
@ -468,7 +468,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> UpdatePartialFieldsNow(Guid id, Expression<Func<TEntity, TEntity>> updateFactory,
|
public async Task<bool> UpdatePartialFieldsNowAsync(Guid id, Expression<Func<TEntity, TEntity>> updateFactory,
|
||||||
params EntityVerifyExp<TEntity>[] verify)
|
params EntityVerifyExp<TEntity>[] verify)
|
||||||
{
|
{
|
||||||
await SetPartialFieldUpdateAsync(id, updateFactory, verify);
|
await SetPartialFieldUpdateAsync(id, updateFactory, verify);
|
||||||
|
@ -534,7 +534,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
/// <param name="ignoreEntityNullProperty"></param>
|
/// <param name="ignoreEntityNullProperty"></param>
|
||||||
/// <param name="verify"></param>
|
/// <param name="verify"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<TEntity> UpdatePartialFields(TEntity entity, string[] propertyNames,
|
public async Task<TEntity> UpdatePartialFieldsAsync(TEntity entity, string[] propertyNames,
|
||||||
bool autoSave = false, bool ignoreEntityNullProperty = true, params EntityVerifyExp<TEntity>[] verify)
|
bool autoSave = false, bool ignoreEntityNullProperty = true, params EntityVerifyExp<TEntity>[] verify)
|
||||||
{
|
{
|
||||||
await EntityVerifyAsync(false, verify, entity.Id);
|
await EntityVerifyAsync(false, verify, entity.Id);
|
||||||
|
|
Loading…
Reference in New Issue