修改仓储批量更新和批量删除方法
This commit is contained in:
@@ -113,7 +113,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
return ResponseOutput.NotOk("该文档下已有签名的用户");
|
||||
}
|
||||
|
||||
var success = await _repository.DeleteFromQueryAsync<SystemDocument>(t => t.Id == systemDocumentId);
|
||||
var success = await _repository.BatchDeleteAsync<SystemDocument>(t => t.Id == systemDocumentId);
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
return ResponseOutput.NotOk("该文档,已有用户签名 不允许删除");
|
||||
}
|
||||
|
||||
var success = await _trialDocumentRepository.DeleteFromQueryAsync(t => t.Id == trialDocumentId);
|
||||
var success = await _trialDocumentRepository.BatchDeleteAsync(t => t.Id == trialDocumentId);
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
@@ -580,11 +580,11 @@ namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
if (isSystemDoc)
|
||||
{
|
||||
await _repository.UpdateFromQueryAsync<SystemDocument>(t => t.Id == documentId, u => new SystemDocument() { IsDeleted = true });
|
||||
await _repository.BatchUpdateAsync<SystemDocument>(t => t.Id == documentId, u => new SystemDocument() { IsDeleted = true });
|
||||
}
|
||||
else
|
||||
{
|
||||
await _trialDocumentRepository.UpdateFromQueryAsync(t => t.Id == documentId, u => new TrialDocument() { IsDeleted = true });
|
||||
await _trialDocumentRepository.BatchUpdateAsync(t => t.Id == documentId, u => new TrialDocument() { IsDeleted = true });
|
||||
}
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user