feat(core): Рефакторинг ShortcodesService, реализован паттерн стратегия
This commit is contained in:
@@ -4,16 +4,16 @@ namespace PARR.Core.Repositories.Interfaces.Unit
|
||||
{
|
||||
public interface IUnitInValueRepository
|
||||
{
|
||||
Task<List<UnitInValue>> GetByUnitIdsAsync(IEnumerable<Guid> unitIds);
|
||||
Task<List<UnitInValue>> GetByUnitIdsAsync(IEnumerable<Guid> unitIds, CancellationToken ct = default);
|
||||
|
||||
Task<List<UnitInValue>> GetByUnitIdAsync(Guid unitId);
|
||||
Task<List<UnitInValue>> GetByUnitIdAsync(Guid unitId, CancellationToken ct = default);
|
||||
|
||||
Task<List<(string FieldName, string? Value)>> GetFieldValuesAsync(Guid unitId, IReadOnlyCollection<string> aihitNames);
|
||||
Task<List<(string FieldName, string? Value)>> GetFieldValuesAsync(Guid unitId, IReadOnlyCollection<string> aihitNames, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Получает UnitInValue (с Value) для заданных UnitId и FieldId.
|
||||
/// </summary>
|
||||
Task<List<UnitInValue>> GetByUnitIdsAndFieldIdsAsync(IEnumerable<Guid> unitIds, IEnumerable<Guid> fieldIds);
|
||||
Task<List<UnitInValue>> GetByUnitIdsAndFieldIdsAsync(IEnumerable<Guid> unitIds, IEnumerable<Guid> fieldIds, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Находит наиболее часто встречающееся непустое значение указанного поля среди переданных юнитов.
|
||||
@@ -21,7 +21,7 @@ namespace PARR.Core.Repositories.Interfaces.Unit
|
||||
/// <param name="unitIds">Список Id юнитов для анализа.</param>
|
||||
/// <param name="fieldName">Имя поля (AihitName) для поиска значения.</param>
|
||||
/// <returns>Наиболее частое значение поля или null, если не найдено.</returns>
|
||||
Task<string?> GetMostFrequentValueForFieldAsync(List<Guid> unitIds, string fieldName);
|
||||
Task<string?> GetMostFrequentValueForFieldAsync(List<Guid> unitIds, string fieldName, CancellationToken ct = default);
|
||||
|
||||
IQueryable<UnitInValue> Get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user