From e6d81936ef3543cf9de8b9c14ab69d43426615eb Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 15 Feb 2022 10:33:02 +0300 Subject: [PATCH 1/4] Catalog service dependency fix for OrderHandler --- .../EShopOnAbp.CatalogService.Domain.Shared.csproj | 2 +- .../CatalogServiceDomainModule.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/catalog/src/EShopOnAbp.CatalogService.Domain.Shared/EShopOnAbp.CatalogService.Domain.Shared.csproj b/services/catalog/src/EShopOnAbp.CatalogService.Domain.Shared/EShopOnAbp.CatalogService.Domain.Shared.csproj index 1c136c24..7a271c66 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.Domain.Shared/EShopOnAbp.CatalogService.Domain.Shared.csproj +++ b/services/catalog/src/EShopOnAbp.CatalogService.Domain.Shared/EShopOnAbp.CatalogService.Domain.Shared.csproj @@ -17,7 +17,7 @@ - + diff --git a/services/catalog/src/EShopOnAbp.CatalogService.Domain/CatalogServiceDomainModule.cs b/services/catalog/src/EShopOnAbp.CatalogService.Domain/CatalogServiceDomainModule.cs index aeefa861..ecb0c0c5 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.Domain/CatalogServiceDomainModule.cs +++ b/services/catalog/src/EShopOnAbp.CatalogService.Domain/CatalogServiceDomainModule.cs @@ -1,4 +1,4 @@ -using EShopOnAbp.BasketService; +using EShopOnAbp.OrderingService; using EShopOnAbp.CatalogService.Products; using Volo.Abp.AutoMapper; using Volo.Abp.Domain; @@ -11,7 +11,7 @@ namespace EShopOnAbp.CatalogService typeof(CatalogServiceDomainSharedModule), typeof(AbpDddDomainModule), typeof(AbpAutoMapperModule), - typeof(BasketServiceDomainSharedModule) + typeof(OrderingServiceDomainSharedModule) )] public class CatalogServiceDomainModule : AbpModule { From 6b564917f6e846f80ee182effdf3c0b77e3b1ed0 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 15 Feb 2022 10:35:48 +0300 Subject: [PATCH 2/4] fixed ordering service tests compile errors --- .../Orders/OrderApplication_Tests.cs | 2 +- .../EntityFrameworkCore/Orders/OrderRepository_Tests.cs | 2 +- .../OrderingServiceTestDataSeedContributor.cs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/ordering/test/EShopOnAbp.OrderingService.Application.Tests/Orders/OrderApplication_Tests.cs b/services/ordering/test/EShopOnAbp.OrderingService.Application.Tests/Orders/OrderApplication_Tests.cs index 79d35857..247737af 100644 --- a/services/ordering/test/EShopOnAbp.OrderingService.Application.Tests/Orders/OrderApplication_Tests.cs +++ b/services/ordering/test/EShopOnAbp.OrderingService.Application.Tests/Orders/OrderApplication_Tests.cs @@ -45,7 +45,7 @@ public class OrderApplication_Tests:OrderingServiceApplicationTestBase var placedOrder = await _orderAppService.CreateAsync(new OrderCreateDto() { - PaymentMethod = 1, + PaymentMethod = "paypal", Address = new OrderAddressDto() { City = "Test City", Country = "Test Country", Description = "No Description", Street = "Test Street", diff --git a/services/ordering/test/EShopOnAbp.OrderingService.EntityFrameworkCore.Tests/EntityFrameworkCore/Orders/OrderRepository_Tests.cs b/services/ordering/test/EShopOnAbp.OrderingService.EntityFrameworkCore.Tests/EntityFrameworkCore/Orders/OrderRepository_Tests.cs index dd60c26f..580b80e4 100644 --- a/services/ordering/test/EShopOnAbp.OrderingService.EntityFrameworkCore.Tests/EntityFrameworkCore/Orders/OrderRepository_Tests.cs +++ b/services/ordering/test/EShopOnAbp.OrderingService.EntityFrameworkCore.Tests/EntityFrameworkCore/Orders/OrderRepository_Tests.cs @@ -54,7 +54,7 @@ public class OrderRepository_Tests : SampleRepository_Tests(); orderItems.Add((Guid.NewGuid(), "Test product", "Code:001", 15, 0, "", 1)); var createdOrder = await _orderManager.CreateOrderAsync( - 1, + "paypal", Guid.Parse("11CA0F6D-208E-441A-9F9B-3611C96E4383"), "gterdem", "gterdem@volosoft.com", diff --git a/services/ordering/test/EShopOnAbp.OrderingService.TestBase/OrderingServiceTestDataSeedContributor.cs b/services/ordering/test/EShopOnAbp.OrderingService.TestBase/OrderingServiceTestDataSeedContributor.cs index 4b2e3aa3..d45e0b19 100644 --- a/services/ordering/test/EShopOnAbp.OrderingService.TestBase/OrderingServiceTestDataSeedContributor.cs +++ b/services/ordering/test/EShopOnAbp.OrderingService.TestBase/OrderingServiceTestDataSeedContributor.cs @@ -30,7 +30,7 @@ namespace EShopOnAbp.OrderingService private async Task SeedTestOrdersAsync() { await _orderManager.CreateOrderAsync( - 1, + "paypal", _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail, @@ -42,7 +42,7 @@ namespace EShopOnAbp.OrderingService ); await _orderManager.CreateOrderAsync( - 1, _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail, + "paypal", _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail, _testProducts.GetRandomProducts(10), _testData.Address.Street, _testData.Address.City, @@ -51,7 +51,7 @@ namespace EShopOnAbp.OrderingService ); await _orderManager.CreateOrderAsync( - 1, _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail, + "paypal", _testData.CurrentUserId, _testData.CurrentUserName, _testData.CurrentUserEmail, _testProducts.GetRandomProducts(2), _testData.Address.Street, _testData.Address.City, @@ -60,7 +60,7 @@ namespace EShopOnAbp.OrderingService ); await _orderManager.CreateOrderAsync( - 1, _testData.TestUserId, _testData.TestUserName, _testData.TestUserEmail, + "paypal", _testData.TestUserId, _testData.TestUserName, _testData.TestUserEmail, _testProducts.GetRandomProducts(7), _testData.Address.Street, _testData.Address.City, From c702cec2b0cfa44103dddf2aa0a1a254267602e3 Mon Sep 17 00:00:00 2001 From: Galip Tolga Erdem Date: Tue, 15 Feb 2022 11:01:27 +0300 Subject: [PATCH 3/4] removed unused field warnings --- .../src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml index 0569ed16..20820665 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml @@ -18,14 +18,13 @@ @{ string lastYearString = $"y{DateTime.Today.Year - 1}"; - string filter = ""; int lastYearCounter = 2; var selectList = new List { - new(@L["MyOrders:Last30Days"], "last30", selected: true), - new(@L["MyOrders:LastMonth"], "m1"), - new(@L["MyOrders:Last3Months"], "m3"), - new(@L["MyOrders:LastYear"], lastYearString) + new(L["MyOrders:Last30Days"], "last30", selected: true), + new(L["MyOrders:LastMonth"], "m1"), + new(L["MyOrders:Last3Months"], "m3"), + new(L["MyOrders:LastYear"], lastYearString) }; for (int i = 0; i < lastYearCounter; i++) { From 18bf95416f1ac0d3f5597b06cdf8e7398d0a14c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 15 Feb 2022 11:56:45 +0300 Subject: [PATCH 4/4] Removed comments from proto file --- .../Protos/product.proto | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/services/catalog/src/EShopOnAbp.CatalogService.Application.Contracts/Protos/product.proto b/services/catalog/src/EShopOnAbp.CatalogService.Application.Contracts/Protos/product.proto index fbf6afd2..3c5274ed 100644 --- a/services/catalog/src/EShopOnAbp.CatalogService.Application.Contracts/Protos/product.proto +++ b/services/catalog/src/EShopOnAbp.CatalogService.Application.Contracts/Protos/product.proto @@ -1,21 +1,11 @@ syntax = "proto3"; -/* >> -import "google/api/annotations.proto"; -<< */ - option csharp_namespace = "EShopOnAbp.CatalogService.Grpc"; package CatalogApi; service ProductPublic { - rpc GetById(ProductRequest) returns (ProductResponse) { - /* >> - option (google.api.http) = { - get: "/api/catalog/product/{id}" - }; -<< */ - } + rpc GetById(ProductRequest) returns (ProductResponse); } message ProductRequest {