feat(api, bll, dal, generatorTemplates, templateActivator): запись истории изменения шаблонов
This commit is contained in:
@@ -9,6 +9,7 @@ using PARR.API.Services.Interfaces;
|
||||
using PARR.API.Settings;
|
||||
using PARR.BLL.Domain.Mq;
|
||||
using PARR.BLL.Services.Interfaces;
|
||||
using PARR.Common.Domain;
|
||||
using PARR.Constants;
|
||||
using System.Text.Json;
|
||||
|
||||
@@ -21,18 +22,21 @@ namespace PARR.API.Controllers.V1
|
||||
private readonly IMqService mqService;
|
||||
private readonly IUriService uriService;
|
||||
private readonly MqSettings mqSettings;
|
||||
private readonly IClientService clientService;
|
||||
|
||||
public GeneratorTemplateController(
|
||||
IValidator<GeneratorTemplateRequest> validator,
|
||||
IMqService mqService,
|
||||
IUriService uriService,
|
||||
MqSettings mqSettings
|
||||
MqSettings mqSettings,
|
||||
IClientService clientService
|
||||
)
|
||||
{
|
||||
this.validator = validator;
|
||||
this.mqService = mqService;
|
||||
this.uriService = uriService;
|
||||
this.mqSettings = mqSettings;
|
||||
this.clientService = clientService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -60,7 +64,8 @@ namespace PARR.API.Controllers.V1
|
||||
WorkId = request.WorkId,
|
||||
StatusEk = status,
|
||||
IsActiveTemplate = request.IsActiveTemplate,
|
||||
IsActiveSchedule = request.IsActiveSchedule
|
||||
IsActiveSchedule = request.IsActiveSchedule,
|
||||
HistoryInitiator = new HistoryInitiator { InitiatorIp = clientService.GetClientIp()?.ToString(), InitiatorParrComponentId = ParrComponentsEnum.Api }
|
||||
};
|
||||
|
||||
var msg = JsonSerializer.Serialize(obj);
|
||||
|
||||
Reference in New Issue
Block a user