feat(dal,api,nextRun,templateGenerator,templateActivator): IsUnused вынесена в TemplateStatusType

This commit is contained in:
Mikhail Kuznetsov
2025-12-01 15:27:18 +10:00
parent 7e708e4aee
commit 3243e33819
17 changed files with 4333 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using PARR.BLL.Services.Interfaces;
using PARR.Common.Domain;
using PARR.Constants;
using PARR.DAL.Models;
using PARR.DAL.Services.Interfaces;
using PARR.DAL.Services.Interfaces.Job;
@@ -81,7 +82,7 @@ namespace PARR.NextRun
// Загружаем только шаблоны текущей группы где nextRun в БД не равен расчетному
var templatesToUpdate = await templateService.Get()
.Where(t => t.IsUnused == false && t.Job!.GroupId == group.Id && t.NextRun != nextRun)
.Where(t => t.StatusTypeId == TemplateStatusTypeEnum.Used && t.Job!.GroupId == group.Id && t.NextRun != nextRun)
.ToListAsync();
if (!templatesToUpdate.Any())