修改仓储批量更新和批量删除方法

This commit is contained in:
2022-04-19 09:01:59 +08:00
parent 7c1fdde2f3
commit eda7ac40bf
53 changed files with 316 additions and 254 deletions
@@ -118,7 +118,7 @@ namespace IRaCIS.Application.Services
return ResponseOutput.NotOk("This item is referenced by content of the trial infomation.");
}
var success = await _dicRepository.DeleteFromQueryAsync(t => t.Id == id);
var success = await _dicRepository.BatchDeleteAsync(t => t.Id == id);
return ResponseOutput.Result(success);
}
@@ -50,7 +50,7 @@ namespace IRaCIS.Core.Application.Contracts
[HttpDelete("{emailNoticeConfigId:guid}")]
public async Task<IResponseOutput> DeleteEmailNoticeConfig(Guid emailNoticeConfigId)
{
var success = await repository.DeleteFromQueryAsync(t => t.Id == emailNoticeConfigId);
var success = await repository.BatchDeleteAsync(t => t.Id == emailNoticeConfigId);
return ResponseOutput.Result(success);
}
@@ -214,7 +214,7 @@ namespace IRaCIS.Core.Application.Service
{
foreach (var item in sortDto.SortData)
{
await _frontAuditConfigRepository.UpdateFromQueryAsync(x => x.Id == item.Id, x => new FrontAuditConfig
await _frontAuditConfigRepository.BatchUpdateAsync(x => x.Id == item.Id, x => new FrontAuditConfig
{
Sort = item.Sort
});
@@ -270,7 +270,7 @@ namespace IRaCIS.Core.Application.Service
{
return ResponseOutput.NotOk("存在子类 无法删除");
}
var success = await _repository.DeleteFromQueryAsync<FrontAuditConfig>(t => t.Id == frontAuditConfigId);
var success = await _repository.BatchDeleteAsync<FrontAuditConfig>(t => t.Id == frontAuditConfigId);
return ResponseOutput.Result(success);
}
@@ -69,7 +69,7 @@ namespace IRaCIS.Core.Application.Services
[HttpDelete("{systemBasicDataId:guid}")]
public async Task<IResponseOutput> DeleteSystemBasicData(Guid systemBasicDataId)
{
var success = await _repository.DeleteFromQueryAsync<SystemBasicData>(t => t.Id == systemBasicDataId);
var success = await _repository.BatchDeleteAsync<SystemBasicData>(t => t.Id == systemBasicDataId);
return ResponseOutput.Result(success);
}