refactor:删除不必要的方法

This commit is contained in:
2025-10-21 13:01:27 +08:00
parent 6872631933
commit 3116e4ce92
27 changed files with 105 additions and 608 deletions

View File

@@ -146,7 +146,12 @@ namespace DMS.Application.Services.Database
try
{
await _repositoryManager.BeginTranAsync();
var delRes = await _repositoryManager.VariableTables.DeleteByIdAsync(id);
var variableTable = await _repositoryManager.VariableTables.GetByIdAsync(id);
if (variableTable == null)
{
throw new InvalidOperationException($"删除变量表失败变量表ID:{id}请检查变量表Id是否存在");
}
var delRes = await _repositoryManager.VariableTables.DeleteAsync(variableTable);
if (delRes == 0)
{
throw new InvalidOperationException($"删除变量表失败变量表ID:{id}请检查变量表Id是否存在");