Treat common and private registries separately

This commit is contained in:
2025-10-28 15:29:17 +09:00
parent 5e5880c367
commit c8686a5899
6 changed files with 23 additions and 15 deletions

View File

@ -3,7 +3,7 @@ using Hcs.WebApp.Services;
namespace Hcs.WebApp.BackgroundServices.CampaignManagers
{
public class ExportRequiredRegistryElementsManager_15_7_0_1(IServiceScope scope, OperationExecutionState operationExecutionState, Campaign campaign) : ManagerBase(scope, operationExecutionState, campaign)
public class ExportCommonRegistryElementsManager_15_7_0_1(IServiceScope scope, OperationExecutionState operationExecutionState, Campaign campaign) : ManagerBase(scope, operationExecutionState, campaign)
{
public override async Task StartAsync()
{
@ -18,9 +18,9 @@ namespace Hcs.WebApp.BackgroundServices.CampaignManagers
{
await headquartersService.SetCampaignStartedAsync(context, campaign.Id);
await headquartersService.SetCampaignStepAsync(context, campaign.Id, 1);
var registryCount = await registryService.GetRegistryCountAsync(context);
var registryCount = await registryService.GetRegistryCountAsync(context, true);
operations = await headquartersService.InitiateOperationsAsync(context, registryCount, campaign.Id, Operation.OperationType.NsiCommon_ExportNsiItem_15_7_0_1);
await registryService.SetOperationsToRegistriesAsync(context, operations);
await registryService.SetOperationsToRegistriesAsync(context, true, operations);
await transaction.CommitAsync();
}
catch

View File

@ -10,8 +10,8 @@ namespace Hcs.WebApp.BackgroundServices.CampaignManagers
{
switch (campaign.Type)
{
case Campaign.CampaignType.ExportRequiredRegistryElements_15_7_0_1:
return new ExportRequiredRegistryElementsManager_15_7_0_1(scope, state, campaign);
case Campaign.CampaignType.ExportCommonRegistryElements_15_7_0_1:
return new ExportCommonRegistryElementsManager_15_7_0_1(scope, state, campaign);
}
throw new NotImplementedException();