From 7ade4e5b19826aa14f7e048559bd4f64245644bf Mon Sep 17 00:00:00 2001 From: vc-ci Date: Wed, 23 Oct 2024 21:02:06 +0000 Subject: [PATCH 1/2] 3.832.0 --- Directory.Build.props | 2 +- src/VirtoCommerce.OrdersModule.Web/module.manifest | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index f7d9426f..5cf8ce14 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.831.0 + 3.832.0 $(VersionSuffix)-$(BuildNumber) diff --git a/src/VirtoCommerce.OrdersModule.Web/module.manifest b/src/VirtoCommerce.OrdersModule.Web/module.manifest index ea8d34f3..3cc0f016 100644 --- a/src/VirtoCommerce.OrdersModule.Web/module.manifest +++ b/src/VirtoCommerce.OrdersModule.Web/module.manifest @@ -1,7 +1,7 @@ VirtoCommerce.Orders - 3.831.0 + 3.832.0 3.853.0 From 3e03a7d3c28cfc54f8bf5d03dcedaff7dd5a6abd Mon Sep 17 00:00:00 2001 From: Evgenii Kolosov <108291208+Ljutyj@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:41:54 +0300 Subject: [PATCH 2/2] VCST-1924: Ability to search for orders by the product (#434) --- .../Model/Search/CustomerOrderSearchCriteria.cs | 5 +++++ .../Services/CustomerOrderSearchService.cs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/VirtoCommerce.OrdersModule.Core/Model/Search/CustomerOrderSearchCriteria.cs b/src/VirtoCommerce.OrdersModule.Core/Model/Search/CustomerOrderSearchCriteria.cs index 9c9624e4..b2527125 100644 --- a/src/VirtoCommerce.OrdersModule.Core/Model/Search/CustomerOrderSearchCriteria.cs +++ b/src/VirtoCommerce.OrdersModule.Core/Model/Search/CustomerOrderSearchCriteria.cs @@ -84,5 +84,10 @@ public string[] OrganizationIds _organizationIds = value; } } + + /// + /// Search orders with a certain product + /// + public string ProductId { get; set; } } } diff --git a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderSearchService.cs b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderSearchService.cs index b47b5a39..87e7aa05 100644 --- a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderSearchService.cs +++ b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderSearchService.cs @@ -71,6 +71,11 @@ protected override IQueryable BuildQuery(IRepository reposi query = WithSubscriptionConditions(query, criteria); + if (!string.IsNullOrEmpty(criteria.ProductId)) + { + query = query.Where(o => o.Items.Any(i => i.ProductId == criteria.ProductId)); + } + return query; }