feat(api, generatorTemplates, templateDistributor): обновлен esppScheduleResponse. Обновлен метод DistributeTemplate, так же обновлены зависимости в GeneratorTemplates

This commit is contained in:
Mikhail Trubnikov
2024-07-04 16:44:25 +10:00
parent a4f6089438
commit 3b3606859a
4 changed files with 6 additions and 3 deletions

View File

@@ -57,6 +57,8 @@
public Guid Id { get; set; } public Guid Id { get; set; }
public required string Value { get; set; } public required string Value { get; set; }
public Guid? DistributionPeriodId { get; set; }
} }
public class EsppScheduleTypeConfigWithDataResponse public class EsppScheduleTypeConfigWithDataResponse

View File

@@ -109,7 +109,7 @@ namespace PARR.GeneratorTemplates.Services
var templates = CreateQueryTemplates(groupingHosts, query); var templates = CreateQueryTemplates(groupingHosts, query);
//заполняем NextRun //заполняем NextRun
templates = await templateDistributor.DistributeTemplateAsync(templates, appInWorkWg.Id); templates = await templateDistributor.DistributeTemplateAsync(templates, appInWorkWg.Id, (Guid)group.Key!);
// сохраняем // сохраняем
foreach (var template in templates) foreach (var template in templates)

View File

@@ -10,7 +10,7 @@ namespace PARR.TemplateDistributor
/// <param name="templates"></param> /// <param name="templates"></param>
/// <param name="applicationInWorkId"></param> /// <param name="applicationInWorkId"></param>
/// <returns></returns> /// <returns></returns>
Task<List<Template>> DistributeTemplateAsync(List<Template> templates, Guid applicationInWorkId); Task<List<Template>> DistributeTemplateAsync(List<Template> templates, Guid applicationInWorkId, Guid workGroupid);
/// <summary> /// <summary>
/// Обновляет расписание запуска шаблонов по РР (сохраняет в БД) /// Обновляет расписание запуска шаблонов по РР (сохраняет в БД)

View File

@@ -24,7 +24,8 @@ namespace PARR.TemplateDistributor
public async Task<List<Template>> DistributeTemplateAsync(List<Template> templates, Guid applicationInWorkId) //public async Task<List<Template>> DistributeTemplateAsync(List<Template> templates, Guid applicationInWorkId)
public async Task<List<Template>> DistributeTemplateAsync(List<Template> templates, Guid applicationInWorkId, Guid workGroupid)
{ {
//TODO: ЗАГУЛШКА переделать! //TODO: ЗАГУЛШКА переделать!