feat(api, bll, dal, generatorTemplates, templateActivator): запись истории изменения шаблонов

This commit is contained in:
Mikhail Trubnikov
2024-10-08 10:29:34 +10:00
parent 54fed9b597
commit a494b69ee6
22 changed files with 140 additions and 67 deletions

View File

@@ -119,7 +119,7 @@ namespace PARR.GeneratorTemplates.Services
// сохраняем
foreach (var template in templates)
{
if (!await templateService.CreateAsync(template) || !await templateService.CommitAsync())
if (!await templateService.CreateAsync(template) || !await templateService.CommitAsync(query.HistoryInitiator))
{
logger.LogError($"Ошибка при создании шаблона: Name: {template.Name}, ApplicationInWorkId: {template.ApplicationInWorkId}, HostId: {template.HostId}");
}
@@ -318,7 +318,7 @@ namespace PARR.GeneratorTemplates.Services
}
});
if (await templateService.CommitAsync())
if (await templateService.CommitAsync(query.HistoryInitiator))
existTemplates.ForEach(item => logger.LogInformation($"Деактивирован шаблон: {item.Name}"));
else
existTemplates.ForEach(item => logger.LogError($"Ошибка при дактивации шаблона: {item.Name}"));