Skip to content

Commit

Permalink
Merge branch 'release/3.806.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Mar 1, 2024
2 parents 6c99560 + 08411bc commit 08c20a6
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/module-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v3.800.2
# https://virtocommerce.atlassian.net/browse/VCST-349
# v3.800.3
# https://virtocommerce.atlassian.net/browse/VCST-570
name: Module CI

on:
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
run: vc-build Compress -skip Clean+Restore+Compile+Test

- name: Publish Nuget
if: ${{ github.ref == 'refs/heads/master' && github.event_name != 'workflow_dispatch' }}
if: ${{ github.ref == 'refs/heads/master' }}
uses: VirtoCommerce/vc-github-actions/publish-nuget@master

- name: Publish to Blob
Expand Down Expand Up @@ -192,13 +192,13 @@ jobs:
fi
- name: Setup Git Credentials
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name != 'workflow_dispatch' }}
if: ${{ (github.ref == 'refs/heads/dev' && github.event_name != 'workflow_dispatch') || github.ref == 'refs/heads/master' }}
uses: VirtoCommerce/vc-github-actions/setup-git-credentials-github@master
with:
githubToken: ${{ secrets.REPO_TOKEN }}

- name: Publish Manifest
if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name != 'workflow_dispatch' }}
if: ${{ (github.ref == 'refs/heads/dev' && github.event_name != 'workflow_dispatch') || github.ref == 'refs/heads/master' }}
uses: VirtoCommerce/vc-github-actions/publish-manifest@master
with:
packageUrl: ${{ steps.artifactUrl.outputs.download_url }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/module-release-hotfix.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v3.800.2
# https://virtocommerce.atlassian.net/browse/VCST-349
# v3.800.3
# https://virtocommerce.atlassian.net/browse/VCST-570
name: Release hotfix

on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-nugets.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v3.800.2
# https://virtocommerce.atlassian.net/browse/VCST-349
# v3.800.3
# https://virtocommerce.atlassian.net/browse/VCST-570
name: Publish nuget

on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# v3.800.2
# https://virtocommerce.atlassian.net/browse/VCST-349
# v3.800.3
# https://virtocommerce.atlassian.net/browse/VCST-570
name: Release

on:
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<!-- These properties will be shared for all projects -->
<PropertyGroup>
<VersionPrefix>3.805.0</VersionPrefix>
<VersionPrefix>3.806.0</VersionPrefix>
<VersionSuffix>
</VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
Expand Down
26 changes: 21 additions & 5 deletions src/VirtoCommerce.OrdersModule.Data/Services/PaymentService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using VirtoCommerce.OrdersModule.Core.Services;
using VirtoCommerce.OrdersModule.Data.Model;
using VirtoCommerce.OrdersModule.Data.Repositories;
using VirtoCommerce.Platform.Caching;
using VirtoCommerce.Platform.Core.Caching;
using VirtoCommerce.Platform.Core.Common;
using VirtoCommerce.Platform.Core.Events;
Expand Down Expand Up @@ -67,26 +68,41 @@ protected virtual async Task DoBulkActionsWithOrderAggregate(IList<PaymentIn> pa
{
throw new OperationCanceledException($"{nameof(PaymentIn.OrderId)} must be set.");
}
var oderIds = payments.Select(x => x.OrderId).Distinct().ToArray();
if (oderIds.Any())
var orderIds = payments.Select(x => x.OrderId).Distinct().ToArray();
if (orderIds.Length > 0)
{
var ordersAggregates = await _customerOrderService.GetAsync(oderIds);
var ordersAggregates = await _customerOrderService.GetAsync(orderIds);
foreach (var payment in payments)
{
var orderAggregateRoot = ordersAggregates.FirstOrDefault(x => x.Id == payment.OrderId);
if (orderAggregateRoot != null)
{
orderAggregateRoot.InPayments.Remove(payment);
orderAggregateRoot.InPayments.Add(payment);
action(orderAggregateRoot, payment);
}
}
await _customerOrderService.SaveChangesAsync(ordersAggregates.ToArray());
}
ClearCache(payments);
}

protected override Task<IList<PaymentInEntity>> LoadEntities(IRepository repository, IList<string> ids, string responseGroup)
{
return ((IOrderRepository)repository).GetPaymentsByIdsAsync(ids);
}

protected override void ClearCache(IList<PaymentIn> models)
{
base.ClearCache(models);

// Clear order cache
GenericSearchCachingRegion<CustomerOrder>.ExpireRegion();

var orderIds = models.Select(x => x.OrderId).Distinct().ToArray();

foreach (var id in orderIds)
{
GenericCachingRegion<CustomerOrder>.ExpireTokenForKey(id);
}
}
}
}
2 changes: 1 addition & 1 deletion src/VirtoCommerce.OrdersModule.Web/module.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<id>VirtoCommerce.Orders</id>
<version>3.805.0</version>
<version>3.806.0</version>
<version-tag />
<platformVersion>3.800.0</platformVersion>
<dependencies>
Expand Down

0 comments on commit 08c20a6

Please sign in to comment.