修改了一些内容

This commit is contained in:
2025-08-22 20:24:09 +08:00
parent 2addd6d3b5
commit f821024756
23 changed files with 454 additions and 41 deletions

View File

@@ -124,4 +124,18 @@ public class VariableAppService : IVariableAppService
throw new ApplicationException($"删除变量时发生错误,操作已回滚,错误信息:{ex.Message}", ex);
}
}
public async Task<bool> BatchImportVariablesAsync(List<VariableDto> variables)
{
try
{
var variableModels = _mapper.Map<List<Variable>>(variables);
var result = await _repoManager.Variables.AddBatchAsync(variableModels);
return result;
}
catch (Exception ex)
{
throw new ApplicationException($"批量导入变量时发生错误,错误信息:{ex.Message}", ex);
}
}
}