Browse Source

Merge pull request #79 from abpframework/gterdem/non-layered

eShopOnAbp: Provide a non-layered microservice example
ipaddr
Enis Necipoglu 5 years ago
committed by GitHub
parent
commit
94535fecdd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      EShopOnAbp.sln
  2. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/BasketProductEventHandler.cs
  3. 4
      apps/public-web/src/EShopOnAbp.PublicWeb/ClientProxies/BasketClientProxy.Generated.cs
  4. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/ClientProxies/BasketClientProxy.cs
  5. 40
      apps/public-web/src/EShopOnAbp.PublicWeb/ClientProxies/basket-generate-proxy.json
  6. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Basket/Default.cshtml
  7. 3
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetViewComponent.cs
  8. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Purchase/PurchaseWidgetViewComponent.cs
  9. 7
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Toolbar/Cart/Default.cshtml
  10. 11
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj
  11. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicAutoMapperProfile.cs
  12. 17
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs
  13. 5
      apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Payment.cshtml.cs
  14. 3
      apps/public-web/src/EShopOnAbp.PublicWeb/ServiceProviders/UserBasketProvider.cs
  15. 94
      services/basket/EShopOnAbp.BasketService.sln
  16. 21
      services/basket/src/EShopOnAbp.BasketService.Application.Contracts/BasketServiceApplicationContractsModule.cs
  17. 27
      services/basket/src/EShopOnAbp.BasketService.Application.Contracts/BasketServiceDtoExtensions.cs
  18. 19
      services/basket/src/EShopOnAbp.BasketService.Application.Contracts/EShopOnAbp.BasketService.Application.Contracts.csproj
  19. 18
      services/basket/src/EShopOnAbp.BasketService.Application/BasketServiceAppService.cs
  20. 15
      services/basket/src/EShopOnAbp.BasketService.Application/BasketServiceApplicationAutoMapperProfile.cs
  21. 41
      services/basket/src/EShopOnAbp.BasketService.Application/BasketServiceApplicationModule.cs
  22. 31
      services/basket/src/EShopOnAbp.BasketService.Application/EShopOnAbp.BasketService.Application.csproj
  23. 2
      services/basket/src/EShopOnAbp.BasketService.Application/Properties/AssemblyInfo.cs
  24. 6
      services/basket/src/EShopOnAbp.BasketService.Contracts/BasketServiceConstants.cs
  25. 39
      services/basket/src/EShopOnAbp.BasketService.Contracts/BasketServiceContractsModule.cs
  26. 7
      services/basket/src/EShopOnAbp.BasketService.Contracts/BasketServiceDomainErrorCodes.cs
  27. 30
      services/basket/src/EShopOnAbp.BasketService.Contracts/EShopOnAbp.BasketService.Contracts.csproj
  28. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/ar.json
  29. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/cs.json
  30. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/de-DE.json
  31. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/en-GB.json
  32. 5
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/en.json
  33. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/es.json
  34. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/fi.json
  35. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/fr.json
  36. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/hi.json
  37. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/hu.json
  38. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/it.json
  39. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/nl.json
  40. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/pl-PL.json
  41. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/pt-BR.json
  42. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/ro-RO.json
  43. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/ru.json
  44. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/sk.json
  45. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/sl.json
  46. 5
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/tr.json
  47. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/vi.json
  48. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/zh-Hans.json
  49. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/zh-Hant.json
  50. 0
      services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketServiceResource.cs
  51. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/AddProductDto.cs
  52. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/BasketDto.cs
  53. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/BasketItemDto.cs
  54. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/IHasAnonymousId.cs
  55. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/RemoveProductDto.cs
  56. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Etos/BasketProductUpdatedEto.cs
  57. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/IBasketAppService.cs
  58. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/IBasketProductService.cs
  59. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Permissions/BasketServicePermissionDefinitionProvider.cs
  60. 2
      services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Permissions/BasketServicePermissions.cs
  61. 8
      services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceDomainErrorCodes.cs
  62. 47
      services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceDomainSharedModule.cs
  63. 23
      services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceGlobalFeatureConfigurator.cs
  64. 69
      services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceModuleExtensionConfigurator.cs
  65. 28
      services/basket/src/EShopOnAbp.BasketService.Domain.Shared/EShopOnAbp.BasketService.Domain.Shared.csproj
  66. 35
      services/basket/src/EShopOnAbp.BasketService.Domain/BasketServiceDomainModule.cs
  67. 19
      services/basket/src/EShopOnAbp.BasketService.Domain/EShopOnAbp.BasketService.Domain.csproj
  68. 3
      services/basket/src/EShopOnAbp.BasketService.Domain/Properties/AssemblyInfo.cs
  69. 13
      services/basket/src/EShopOnAbp.BasketService.Domain/Settings/BasketServiceSettingDefinitionProvider.cs
  70. 10
      services/basket/src/EShopOnAbp.BasketService.Domain/Settings/BasketServiceSettings.cs
  71. 29
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Client/BasketServiceHttpApiClientModule.cs
  72. 23
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Client/EShopOnAbp.BasketService.HttpApi.Client.csproj
  73. 108
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/BasketServiceHttpApiHostModule.cs
  74. 13
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/Controllers/HomeController.cs
  75. 28
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj
  76. 2
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.Development.json
  77. 2
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.secrets.json
  78. 1
      services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/tempkey.rsa
  79. 32
      services/basket/src/EShopOnAbp.BasketService.HttpApi/BasketServiceHttpApiModule.cs
  80. 15
      services/basket/src/EShopOnAbp.BasketService.HttpApi/Controllers/BasketServiceController.cs
  81. 18
      services/basket/src/EShopOnAbp.BasketService.HttpApi/EShopOnAbp.BasketService.HttpApi.csproj
  82. 14
      services/basket/src/EShopOnAbp.BasketService/BasketServiceAutoMapperProfile.cs
  83. 190
      services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs
  84. 12
      services/basket/src/EShopOnAbp.BasketService/Controllers/HomeController.cs
  85. 6
      services/basket/src/EShopOnAbp.BasketService/Dockerfile
  86. 2
      services/basket/src/EShopOnAbp.BasketService/Dockerfile.local
  87. 46
      services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.csproj
  88. 5
      services/basket/src/EShopOnAbp.BasketService/Entities/Basket.cs
  89. 4
      services/basket/src/EShopOnAbp.BasketService/Entities/BasketItem.cs
  90. 6
      services/basket/src/EShopOnAbp.BasketService/Entities/BasketRepository.cs
  91. 4
      services/basket/src/EShopOnAbp.BasketService/Entities/IBasketRepository.cs
  92. 3
      services/basket/src/EShopOnAbp.BasketService/Entities/Orders/OrderPlacedEventHandler.cs
  93. 5
      services/basket/src/EShopOnAbp.BasketService/Program.cs
  94. 18
      services/basket/src/EShopOnAbp.BasketService/Properties/launchSettings.json
  95. 14
      services/basket/src/EShopOnAbp.BasketService/Services/BasketAppService.cs
  96. 6
      services/basket/src/EShopOnAbp.BasketService/Services/BasketProductEventHandler.cs
  97. 7
      services/basket/src/EShopOnAbp.BasketService/Services/BasketProductService.cs
  98. 8
      services/basket/src/EShopOnAbp.BasketService/appsettings.Development.json
  99. 0
      services/basket/src/EShopOnAbp.BasketService/appsettings.json
  100. 7
      services/basket/test/EShopOnAbp.BasketService.Application.Tests/BasketServiceApplicationTestBase.cs

14
EShopOnAbp.sln

@ -35,12 +35,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.PublicWeb", "app
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.CatalogService.HttpApi.Host", "services\catalog\src\EShopOnAbp.CatalogService.HttpApi.Host\EShopOnAbp.CatalogService.HttpApi.Host.csproj", "{3381E059-A2B5-4660-AFDA-5063DEE64154}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.CatalogService.HttpApi.Host", "services\catalog\src\EShopOnAbp.CatalogService.HttpApi.Host\EShopOnAbp.CatalogService.HttpApi.Host.csproj", "{3381E059-A2B5-4660-AFDA-5063DEE64154}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.HttpApi.Host", "services\basket\src\EShopOnAbp.BasketService.HttpApi.Host\EShopOnAbp.BasketService.HttpApi.Host.csproj", "{6AD19BC3-9B40-49AC-AD24-1769C57C60F1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.OrderingService.HttpApi.Host", "services\ordering\src\EShopOnAbp.OrderingService.HttpApi.Host\EShopOnAbp.OrderingService.HttpApi.Host.csproj", "{CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.OrderingService.HttpApi.Host", "services\ordering\src\EShopOnAbp.OrderingService.HttpApi.Host\EShopOnAbp.OrderingService.HttpApi.Host.csproj", "{CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.PaymentService.HttpApi.Host", "services\payment\src\EShopOnAbp.PaymentService.HttpApi.Host\EShopOnAbp.PaymentService.HttpApi.Host.csproj", "{7AE4C613-780E-4DA5-9B57-76F0D40D5146}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.PaymentService.HttpApi.Host", "services\payment\src\EShopOnAbp.PaymentService.HttpApi.Host\EShopOnAbp.PaymentService.HttpApi.Host.csproj", "{7AE4C613-780E-4DA5-9B57-76F0D40D5146}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.BasketService", "services\basket\src\EShopOnAbp.BasketService\EShopOnAbp.BasketService.csproj", "{E373DD66-3247-4D95-B325-064BBBC337B1}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -95,10 +95,6 @@ Global
{3381E059-A2B5-4660-AFDA-5063DEE64154}.Debug|Any CPU.Build.0 = Debug|Any CPU {3381E059-A2B5-4660-AFDA-5063DEE64154}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3381E059-A2B5-4660-AFDA-5063DEE64154}.Release|Any CPU.ActiveCfg = Release|Any CPU {3381E059-A2B5-4660-AFDA-5063DEE64154}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3381E059-A2B5-4660-AFDA-5063DEE64154}.Release|Any CPU.Build.0 = Release|Any CPU {3381E059-A2B5-4660-AFDA-5063DEE64154}.Release|Any CPU.Build.0 = Release|Any CPU
{6AD19BC3-9B40-49AC-AD24-1769C57C60F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AD19BC3-9B40-49AC-AD24-1769C57C60F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AD19BC3-9B40-49AC-AD24-1769C57C60F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AD19BC3-9B40-49AC-AD24-1769C57C60F1}.Release|Any CPU.Build.0 = Release|Any CPU
{CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}.Debug|Any CPU.Build.0 = Debug|Any CPU {CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}.Release|Any CPU.ActiveCfg = Release|Any CPU {CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -107,6 +103,10 @@ Global
{7AE4C613-780E-4DA5-9B57-76F0D40D5146}.Debug|Any CPU.Build.0 = Debug|Any CPU {7AE4C613-780E-4DA5-9B57-76F0D40D5146}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7AE4C613-780E-4DA5-9B57-76F0D40D5146}.Release|Any CPU.ActiveCfg = Release|Any CPU {7AE4C613-780E-4DA5-9B57-76F0D40D5146}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7AE4C613-780E-4DA5-9B57-76F0D40D5146}.Release|Any CPU.Build.0 = Release|Any CPU {7AE4C613-780E-4DA5-9B57-76F0D40D5146}.Release|Any CPU.Build.0 = Release|Any CPU
{E373DD66-3247-4D95-B325-064BBBC337B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E373DD66-3247-4D95-B325-064BBBC337B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E373DD66-3247-4D95-B325-064BBBC337B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E373DD66-3247-4D95-B325-064BBBC337B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -124,9 +124,9 @@ Global
{2E0B715C-3AAD-47B3-B2EB-D34CB24CBEFA} = {1484E912-DCF3-4568-A72C-4C7622104DB8} {2E0B715C-3AAD-47B3-B2EB-D34CB24CBEFA} = {1484E912-DCF3-4568-A72C-4C7622104DB8}
{969029FC-CFCF-4F95-9778-E5C69117711E} = {866DB6CC-FEA8-4CC2-A2E4-143537D197B6} {969029FC-CFCF-4F95-9778-E5C69117711E} = {866DB6CC-FEA8-4CC2-A2E4-143537D197B6}
{3381E059-A2B5-4660-AFDA-5063DEE64154} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3} {3381E059-A2B5-4660-AFDA-5063DEE64154} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{6AD19BC3-9B40-49AC-AD24-1769C57C60F1} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3} {CE23F65B-BCDD-40D5-8AB5-80D9F52D3FA1} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{7AE4C613-780E-4DA5-9B57-76F0D40D5146} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3} {7AE4C613-780E-4DA5-9B57-76F0D40D5146} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{E373DD66-3247-4D95-B325-064BBBC337B1} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {26F82565-C6A4-439D-93A4-3251E3E7D5B0} SolutionGuid = {26F82565-C6A4-439D-93A4-3251E3E7D5B0}

2
apps/public-web/src/EShopOnAbp.PublicWeb/BasketProductEventHandler.cs

@ -1,5 +1,5 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using EShopOnAbp.BasketService; using EShopOnAbp.BasketService.Services;
using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;

4
services/basket/src/EShopOnAbp.BasketService.HttpApi.Client/ClientProxies/BasketClientProxy.Generated.cs → apps/public-web/src/EShopOnAbp.PublicWeb/ClientProxies/BasketClientProxy.Generated.cs

@ -6,10 +6,10 @@ using Volo.Abp.Http.Client;
using Volo.Abp.Http.Modeling; using Volo.Abp.Http.Modeling;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Http.Client.ClientProxying; using Volo.Abp.Http.Client.ClientProxying;
using EShopOnAbp.BasketService; using EShopOnAbp.BasketService.Services;
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
namespace EShopOnAbp.BasketService.ClientProxies; namespace EShopOnAbp.BasketService.Services.ClientProxies;
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IBasketAppService), typeof(BasketClientProxy))] [ExposeServices(typeof(IBasketAppService), typeof(BasketClientProxy))]

2
services/basket/src/EShopOnAbp.BasketService.HttpApi.Client/ClientProxies/BasketClientProxy.cs → apps/public-web/src/EShopOnAbp.PublicWeb/ClientProxies/BasketClientProxy.cs

@ -1,6 +1,6 @@
// This file is part of BasketClientProxy, you can customize it here // This file is part of BasketClientProxy, you can customize it here
// ReSharper disable once CheckNamespace // ReSharper disable once CheckNamespace
namespace EShopOnAbp.BasketService.ClientProxies; namespace EShopOnAbp.BasketService.Services.ClientProxies;
public partial class BasketClientProxy public partial class BasketClientProxy
{ {

40
services/basket/src/EShopOnAbp.BasketService.HttpApi.Client/ClientProxies/basket-generate-proxy.json → apps/public-web/src/EShopOnAbp.PublicWeb/ClientProxies/basket-generate-proxy.json

@ -4,10 +4,10 @@
"rootPath": "basket", "rootPath": "basket",
"remoteServiceName": "Basket", "remoteServiceName": "Basket",
"controllers": { "controllers": {
"EShopOnAbp.BasketService.BasketAppService": { "EShopOnAbp.BasketService.Services.BasketAppService": {
"controllerName": "Basket", "controllerName": "Basket",
"controllerGroupName": "Basket", "controllerGroupName": "Basket",
"type": "EShopOnAbp.BasketService.BasketAppService", "type": "EShopOnAbp.BasketService.Services.BasketAppService",
"interfaces": [ "interfaces": [
{ {
"type": "Volo.Abp.Validation.IValidationEnabled" "type": "Volo.Abp.Validation.IValidationEnabled"
@ -19,7 +19,7 @@
"type": "Volo.Abp.GlobalFeatures.IGlobalFeatureCheckingEnabled" "type": "Volo.Abp.GlobalFeatures.IGlobalFeatureCheckingEnabled"
}, },
{ {
"type": "EShopOnAbp.BasketService.IBasketAppService" "type": "EShopOnAbp.BasketService.Services.IBasketAppService"
} }
], ],
"actions": { "actions": {
@ -54,11 +54,11 @@
} }
], ],
"returnValue": { "returnValue": {
"type": "EShopOnAbp.BasketService.BasketDto", "type": "EShopOnAbp.BasketService.Services.BasketDto",
"typeSimple": "EShopOnAbp.BasketService.BasketDto" "typeSimple": "EShopOnAbp.BasketService.Services.BasketDto"
}, },
"allowAnonymous": null, "allowAnonymous": null,
"implementFrom": "EShopOnAbp.BasketService.IBasketAppService" "implementFrom": "EShopOnAbp.BasketService.Services.IBasketAppService"
}, },
"AddProductAsyncByInput": { "AddProductAsyncByInput": {
"uniqueName": "AddProductAsyncByInput", "uniqueName": "AddProductAsyncByInput",
@ -69,9 +69,9 @@
"parametersOnMethod": [ "parametersOnMethod": [
{ {
"name": "input", "name": "input",
"typeAsString": "EShopOnAbp.BasketService.AddProductDto, EShopOnAbp.BasketService.Application.Contracts", "typeAsString": "EShopOnAbp.BasketService.Services.AddProductDto, EShopOnAbp.BasketService.Contracts",
"type": "EShopOnAbp.BasketService.AddProductDto", "type": "EShopOnAbp.BasketService.Services.AddProductDto",
"typeSimple": "EShopOnAbp.BasketService.AddProductDto", "typeSimple": "EShopOnAbp.BasketService.Services.AddProductDto",
"isOptional": false, "isOptional": false,
"defaultValue": null "defaultValue": null
} }
@ -81,8 +81,8 @@
"nameOnMethod": "input", "nameOnMethod": "input",
"name": "input", "name": "input",
"jsonName": null, "jsonName": null,
"type": "EShopOnAbp.BasketService.AddProductDto", "type": "EShopOnAbp.BasketService.Services.AddProductDto",
"typeSimple": "EShopOnAbp.BasketService.AddProductDto", "typeSimple": "EShopOnAbp.BasketService.Services.AddProductDto",
"isOptional": false, "isOptional": false,
"defaultValue": null, "defaultValue": null,
"constraintTypes": null, "constraintTypes": null,
@ -91,11 +91,11 @@
} }
], ],
"returnValue": { "returnValue": {
"type": "EShopOnAbp.BasketService.BasketDto", "type": "EShopOnAbp.BasketService.Services.BasketDto",
"typeSimple": "EShopOnAbp.BasketService.BasketDto" "typeSimple": "EShopOnAbp.BasketService.Services.BasketDto"
}, },
"allowAnonymous": null, "allowAnonymous": null,
"implementFrom": "EShopOnAbp.BasketService.IBasketAppService" "implementFrom": "EShopOnAbp.BasketService.Services.IBasketAppService"
}, },
"RemoveProductAsyncByInput": { "RemoveProductAsyncByInput": {
"uniqueName": "RemoveProductAsyncByInput", "uniqueName": "RemoveProductAsyncByInput",
@ -106,9 +106,9 @@
"parametersOnMethod": [ "parametersOnMethod": [
{ {
"name": "input", "name": "input",
"typeAsString": "EShopOnAbp.BasketService.RemoveProductDto, EShopOnAbp.BasketService.Application.Contracts", "typeAsString": "EShopOnAbp.BasketService.Services.RemoveProductDto, EShopOnAbp.BasketService.Contracts",
"type": "EShopOnAbp.BasketService.RemoveProductDto", "type": "EShopOnAbp.BasketService.Services.RemoveProductDto",
"typeSimple": "EShopOnAbp.BasketService.RemoveProductDto", "typeSimple": "EShopOnAbp.BasketService.Services.RemoveProductDto",
"isOptional": false, "isOptional": false,
"defaultValue": null "defaultValue": null
} }
@ -152,11 +152,11 @@
} }
], ],
"returnValue": { "returnValue": {
"type": "EShopOnAbp.BasketService.BasketDto", "type": "EShopOnAbp.BasketService.Services.BasketDto",
"typeSimple": "EShopOnAbp.BasketService.BasketDto" "typeSimple": "EShopOnAbp.BasketService.Services.BasketDto"
}, },
"allowAnonymous": null, "allowAnonymous": null,
"implementFrom": "EShopOnAbp.BasketService.IBasketAppService" "implementFrom": "EShopOnAbp.BasketService.Services.IBasketAppService"
} }
} }
} }

2
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Basket/Default.cshtml

@ -1,7 +1,7 @@
@using EShopOnAbp.Localization @using EShopOnAbp.Localization
@using EShopOnAbp.PublicWeb.Components.Purchase @using EShopOnAbp.PublicWeb.Components.Purchase
@using Microsoft.Extensions.Localization @using Microsoft.Extensions.Localization
@model EShopOnAbp.BasketService.BasketDto @model EShopOnAbp.BasketService.Services.BasketDto
@inject IStringLocalizer<EShopOnAbpResource> L @inject IStringLocalizer<EShopOnAbpResource> L
<div> <div>

3
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetViewComponent.cs

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using EShopOnAbp.BasketService; using EShopOnAbp.BasketService.Services;
using EShopOnAbp.PaymentService.PaymentMethods;
using EShopOnAbp.PublicWeb.ServiceProviders; using EShopOnAbp.PublicWeb.ServiceProviders;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;

2
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Purchase/PurchaseWidgetViewComponent.cs

@ -1,5 +1,5 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using EShopOnAbp.BasketService; using EShopOnAbp.BasketService.Services;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets; using Volo.Abp.AspNetCore.Mvc.UI.Widgets;

7
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Toolbar/Cart/Default.cshtml

@ -1,8 +1,7 @@
@using EShopOnAbp.BasketService.Localization @using EShopOnAbp.Localization
@using EShopOnAbp.PublicWeb.Components.Basket
@using Microsoft.AspNetCore.Mvc.Localization @using Microsoft.AspNetCore.Mvc.Localization
@inject IHtmlLocalizer<BasketServiceResource> L @inject IHtmlLocalizer<EShopOnAbpResource> L
@model EShopOnAbp.BasketService.BasketDto @model EShopOnAbp.BasketService.Services.BasketDto
<div id="shopping-cart" class="nav-link"> <div id="shopping-cart" class="nav-link">
@if (Model == null) @if (Model == null)

11
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj

@ -25,7 +25,7 @@
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.AspNetCore\EShopOnAbp.Shared.Hosting.AspNetCore.csproj" /> <ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.AspNetCore\EShopOnAbp.Shared.Hosting.AspNetCore.csproj" />
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Localization\EShopOnAbp.Shared.Localization.csproj" /> <ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Localization\EShopOnAbp.Shared.Localization.csproj" />
<ProjectReference Include="..\..\..\..\services\catalog\src\EShopOnAbp.CatalogService.HttpApi.Client\EShopOnAbp.CatalogService.HttpApi.Client.csproj" /> <ProjectReference Include="..\..\..\..\services\catalog\src\EShopOnAbp.CatalogService.HttpApi.Client\EShopOnAbp.CatalogService.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\services\basket\src\EShopOnAbp.BasketService.HttpApi.Client\EShopOnAbp.BasketService.HttpApi.Client.csproj" /> <ProjectReference Include="..\..\..\..\services\basket\src\EShopOnAbp.BasketService.Contracts\EShopOnAbp.BasketService.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\services\payment\src\EShopOnAbp.PaymentService.HttpApi.Client\EShopOnAbp.PaymentService.HttpApi.Client.csproj" /> <ProjectReference Include="..\..\..\..\services\payment\src\EShopOnAbp.PaymentService.HttpApi.Client\EShopOnAbp.PaymentService.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\services\ordering\src\EShopOnAbp.OrderingService.HttpApi.Client\EShopOnAbp.OrderingService.HttpApi.Client.csproj" /> <ProjectReference Include="..\..\..\..\services\ordering\src\EShopOnAbp.OrderingService.HttpApi.Client\EShopOnAbp.OrderingService.HttpApi.Client.csproj" />
</ItemGroup> </ItemGroup>
@ -39,6 +39,11 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="**\*generate-proxy.json" />
<Content Remove="**\*generate-proxy.json" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Logs\**" /> <Compile Remove="Logs\**" />
<Content Remove="Logs\**" /> <Content Remove="Logs\**" />
@ -46,4 +51,8 @@
<None Remove="Logs\**" /> <None Remove="Logs\**" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="ClientProxies\app-generate-proxy.json" />
</ItemGroup>
</Project> </Project>

2
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicAutoMapperProfile.cs

@ -1,5 +1,5 @@
using AutoMapper; using AutoMapper;
using EShopOnAbp.BasketService; using EShopOnAbp.BasketService.Services;
using EShopOnAbp.OrderingService.Orders; using EShopOnAbp.OrderingService.Orders;
using EShopOnAbp.PaymentService.PaymentRequests; using EShopOnAbp.PaymentService.PaymentRequests;
using Volo.Abp.AutoMapper; using Volo.Abp.AutoMapper;

17
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs

@ -40,6 +40,7 @@ using EShopOnAbp.PublicWeb.PaymentMethods;
using EShopOnAbp.PaymentService.PaymentMethods; using EShopOnAbp.PaymentService.PaymentMethods;
using EShopOnAbp.PublicWeb.AnonymousUser; using EShopOnAbp.PublicWeb.AnonymousUser;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Volo.Abp.VirtualFileSystem;
namespace EShopOnAbp.PublicWeb; namespace EShopOnAbp.PublicWeb;
@ -54,7 +55,7 @@ namespace EShopOnAbp.PublicWeb;
typeof(EShopOnAbpSharedHostingAspNetCoreModule), typeof(EShopOnAbpSharedHostingAspNetCoreModule),
typeof(EShopOnAbpSharedLocalizationModule), typeof(EShopOnAbpSharedLocalizationModule),
typeof(CatalogServiceHttpApiClientModule), typeof(CatalogServiceHttpApiClientModule),
typeof(BasketServiceHttpApiClientModule), typeof(BasketServiceContractsModule),
typeof(OrderingServiceHttpApiClientModule), typeof(OrderingServiceHttpApiClientModule),
typeof(AbpAspNetCoreSignalRModule), typeof(AbpAspNetCoreSignalRModule),
typeof(PaymentServiceHttpApiClientModule), typeof(PaymentServiceHttpApiClientModule),
@ -79,6 +80,8 @@ public class EShopOnAbpPublicWebModule : AbpModule
var hostingEnvironment = context.Services.GetHostingEnvironment(); var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration(); var configuration = context.Services.GetConfiguration();
ConfigureBasketHttpClient(context);
context.Services.AddAutoMapperObjectMapper<EShopOnAbpPublicWebModule>(); context.Services.AddAutoMapperObjectMapper<EShopOnAbpPublicWebModule>();
Configure<AbpAutoMapperOptions>(options => { options.AddMaps<EShopOnAbpPublicWebModule>(validate: true); }); Configure<AbpAutoMapperOptions>(options => { options.AddMaps<EShopOnAbpPublicWebModule>(validate: true); });
@ -159,6 +162,18 @@ public class EShopOnAbpPublicWebModule : AbpModule
}); });
} }
private void ConfigureBasketHttpClient(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(
typeof(BasketServiceContractsModule).Assembly, remoteServiceConfigurationName: BasketServiceConstants.RemoteServiceName
);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<EShopOnAbpPublicWebModule>();
});
}
private void ConfigurePayment(IConfiguration configuration) private void ConfigurePayment(IConfiguration configuration)
{ {
Configure<EShopOnAbpPublicWebPaymentOptions>(options => Configure<EShopOnAbpPublicWebPaymentOptions>(options =>

5
apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Payment.cshtml.cs

@ -1,6 +1,4 @@
using System; using EShopOnAbp.PaymentService.PaymentRequests;
using EShopOnAbp.BasketService;
using EShopOnAbp.PaymentService.PaymentRequests;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@ -8,6 +6,7 @@ using Microsoft.Extensions.Options;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using EShopOnAbp.BasketService.Services;
using EShopOnAbp.OrderingService.Orders; using EShopOnAbp.OrderingService.Orders;
using EShopOnAbp.PublicWeb.ServiceProviders; using EShopOnAbp.PublicWeb.ServiceProviders;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;

3
apps/public-web/src/EShopOnAbp.PublicWeb/ServiceProviders/UserBasketProvider.cs

@ -1,11 +1,10 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using EShopOnAbp.BasketService; using EShopOnAbp.BasketService.Services;
using EShopOnAbp.Shared.Hosting.AspNetCore; using EShopOnAbp.Shared.Hosting.AspNetCore;
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Users;
namespace EShopOnAbp.PublicWeb.ServiceProviders namespace EShopOnAbp.PublicWeb.ServiceProviders
{ {

94
services/basket/EShopOnAbp.BasketService.sln

@ -3,33 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31717.71 VisualStudioVersion = 17.0.31717.71
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.Domain", "src\EShopOnAbp.BasketService.Domain\EShopOnAbp.BasketService.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.Application", "src\EShopOnAbp.BasketService.Application\EShopOnAbp.BasketService.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.Application.Tests", "test\EShopOnAbp.BasketService.Application.Tests\EShopOnAbp.BasketService.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.BasketService", "src\EShopOnAbp.BasketService\EShopOnAbp.BasketService.csproj", "{83F0BE02-6B71-4695-B86F-18DEEE34B485}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.Domain.Shared", "src\EShopOnAbp.BasketService.Domain.Shared\EShopOnAbp.BasketService.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.Application.Contracts", "src\EShopOnAbp.BasketService.Application.Contracts\EShopOnAbp.BasketService.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.HttpApi", "src\EShopOnAbp.BasketService.HttpApi\EShopOnAbp.BasketService.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.HttpApi.Client", "src\EShopOnAbp.BasketService.HttpApi.Client\EShopOnAbp.BasketService.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.EntityFrameworkCore.Tests", "test\EShopOnAbp.BasketService.EntityFrameworkCore.Tests\EShopOnAbp.BasketService.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.TestBase", "test\EShopOnAbp.BasketService.TestBase\EShopOnAbp.BasketService.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.Domain.Tests", "test\EShopOnAbp.BasketService.Domain.Tests\EShopOnAbp.BasketService.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.HttpApi.Client.ConsoleTestApp", "test\EShopOnAbp.BasketService.HttpApi.Client.ConsoleTestApp\EShopOnAbp.BasketService.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.BasketService.HttpApi.Host", "src\EShopOnAbp.BasketService.HttpApi.Host\EShopOnAbp.BasketService.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.BasketService.Contracts", "src\EShopOnAbp.BasketService.Contracts\EShopOnAbp.BasketService.Contracts.csproj", "{D2C4E464-221E-42F3-B1BB-79ABC5C3AC64}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -37,71 +17,21 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {83F0BE02-6B71-4695-B86F-18DEEE34B485}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU {83F0BE02-6B71-4695-B86F-18DEEE34B485}.Debug|Any CPU.Build.0 = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU {83F0BE02-6B71-4695-B86F-18DEEE34B485}.Release|Any CPU.ActiveCfg = Release|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU {83F0BE02-6B71-4695-B86F-18DEEE34B485}.Release|Any CPU.Build.0 = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D2C4E464-221E-42F3-B1BB-79ABC5C3AC64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU {D2C4E464-221E-42F3-B1BB-79ABC5C3AC64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU {D2C4E464-221E-42F3-B1BB-79ABC5C3AC64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU {D2C4E464-221E-42F3-B1BB-79ABC5C3AC64}.Release|Any CPU.Build.0 = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {83F0BE02-6B71-4695-B86F-18DEEE34B485} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} {D2C4E464-221E-42F3-B1BB-79ABC5C3AC64} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D} SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}

21
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/BasketServiceApplicationContractsModule.cs

@ -1,21 +0,0 @@
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending;
namespace EShopOnAbp.BasketService
{
[DependsOn(
typeof(BasketServiceDomainSharedModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpAuthorizationModule),
typeof(AbpObjectExtendingModule)
)]
public class BasketServiceApplicationContractsModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
BasketServiceDtoExtensions.Configure();
}
}
}

27
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/BasketServiceDtoExtensions.cs

@ -1,27 +0,0 @@
using Volo.Abp.Threading;
namespace EShopOnAbp.BasketService
{
public static class BasketServiceDtoExtensions
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can add extension properties to DTOs
* defined in the depended modules.
*
* Example:
*
* ObjectExtensionManager.Instance
* .AddOrUpdateProperty<IdentityRoleDto, string>("Title");
*
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Object-Extensions
*/
});
}
}
}

19
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/EShopOnAbp.BasketService.Application.Contracts.csproj

@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.BasketService.Domain.Shared\EShopOnAbp.BasketService.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Authorization" Version="5.1.2" />
</ItemGroup>
</Project>

18
services/basket/src/EShopOnAbp.BasketService.Application/BasketServiceAppService.cs

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using EShopOnAbp.BasketService.Localization;
using Volo.Abp.Application.Services;
namespace EShopOnAbp.BasketService
{
/* Inherit your application services from this class.
*/
public abstract class BasketServiceAppService : ApplicationService
{
protected BasketServiceAppService()
{
LocalizationResource = typeof(BasketServiceResource);
}
}
}

15
services/basket/src/EShopOnAbp.BasketService.Application/BasketServiceApplicationAutoMapperProfile.cs

@ -1,15 +0,0 @@
using AutoMapper;
using EShopOnAbp.CatalogService.Grpc;
using EShopOnAbp.CatalogService.Products;
namespace EShopOnAbp.BasketService
{
public class BasketServiceApplicationAutoMapperProfile : Profile
{
public BasketServiceApplicationAutoMapperProfile()
{
CreateMap<ProductEto, ProductDto>();
CreateMap<ProductResponse, ProductDto>();
}
}
}

41
services/basket/src/EShopOnAbp.BasketService.Application/BasketServiceApplicationModule.cs

@ -1,41 +0,0 @@
using System;
using System.Collections.Generic;
using EShopOnAbp.CatalogService;
using EShopOnAbp.CatalogService.Grpc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
namespace EShopOnAbp.BasketService
{
[DependsOn(
typeof(BasketServiceDomainModule),
typeof(BasketServiceApplicationContractsModule),
typeof(AbpDddApplicationModule),
typeof(AbpAutoMapperModule),
typeof(CatalogServiceHttpApiClientModule)
)]
public class BasketServiceApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BasketServiceApplicationModule>();
});
context.Services.AddGrpcClient<ProductPublic.ProductPublicClient>((services, options) =>
{
var remoteServiceOptions = services.GetRequiredService<IOptionsMonitor<AbpRemoteServiceOptions>>().CurrentValue;
var catalogServiceConfiguration = remoteServiceOptions.RemoteServices.GetConfigurationOrDefault("Catalog");
var catalogGrpcUrl = catalogServiceConfiguration.GetOrDefault("GrpcUrl");
options.Address = new Uri(catalogGrpcUrl);
});
}
}
}

31
services/basket/src/EShopOnAbp.BasketService.Application/EShopOnAbp.BasketService.Application.csproj

@ -1,31 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.BasketService.Domain\EShopOnAbp.BasketService.Domain.csproj" />
<ProjectReference Include="..\EShopOnAbp.BasketService.Application.Contracts\EShopOnAbp.BasketService.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.HttpApi.Client\EShopOnAbp.CatalogService.HttpApi.Client.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="5.1.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.19.3" />
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.42.0" />
<PackageReference Include="Grpc.Tools" Version="2.42.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.Application.Contracts\Protos\product.proto" GrpcServices="Client" />
</ItemGroup>
</Project>

2
services/basket/src/EShopOnAbp.BasketService.Application/Properties/AssemblyInfo.cs

@ -1,2 +0,0 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("EShopOnAbp.BasketService.Application.Tests")]

6
services/basket/src/EShopOnAbp.BasketService.Contracts/BasketServiceConstants.cs

@ -0,0 +1,6 @@
namespace EShopOnAbp.BasketService;
public static class BasketServiceConstants
{
public static readonly string RemoteServiceName = "Basket";
}

39
services/basket/src/EShopOnAbp.BasketService.Contracts/BasketServiceContractsModule.cs

@ -0,0 +1,39 @@
using EShopOnAbp.BasketService.Localization;
using EShopOnAbp.CatalogService;
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization;
namespace EShopOnAbp.BasketService;
[DependsOn(
typeof(CatalogServiceApplicationContractsModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpAuthorizationModule),
typeof(AbpValidationModule)
)]
public class BasketServiceContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<BasketServiceResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/BasketService");
options.DefaultResourceType = typeof(BasketServiceResource);
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("BasketService", typeof(BasketServiceResource));
});
}
}

7
services/basket/src/EShopOnAbp.BasketService.Contracts/BasketServiceDomainErrorCodes.cs

@ -0,0 +1,7 @@
namespace EShopOnAbp.BasketService;
public static class BasketServiceDomainErrorCodes
{
/* You can add your business exception error codes here, as constants */
public const string ProductNotFound = "ProductNotFound";
}

30
services/basket/src/EShopOnAbp.BasketService.Contracts/EShopOnAbp.BasketService.Contracts.csproj

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Authorization" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Validation" Version="5.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.Application.Contracts\EShopOnAbp.CatalogService.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="**\*generate-proxy.json" />
<Content Remove="**\*generate-proxy.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\BasketService\*.json" />
<Content Remove="Localization\BasketService\*.json" />
</ItemGroup>
</Project>

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/ar.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/ar.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/cs.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/cs.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/de-DE.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/de-DE.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/en-GB.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/en-GB.json

5
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/en.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/en.json

@ -3,10 +3,7 @@
"texts": { "texts": {
"Menu:Home": "Home", "Menu:Home": "Home",
"Welcome": "Welcome", "Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.", "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.",
"Toolbar:Cart": "My Cart",
"Toolbar:BasketNotLoaded": "Couldn't Load!",
"Toolbar:CartEmpty": "Cart is Empty!",
"ProductNotFound": "Could not find the product!" "ProductNotFound": "Could not find the product!"
} }
} }

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/es.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/es.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/fi.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/fi.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/fr.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/fr.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/hi.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/hi.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/hu.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/hu.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/it.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/it.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/nl.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/nl.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/pl-PL.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/pl-PL.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/pt-BR.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/pt-BR.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/ro-RO.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/ro-RO.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/ru.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/ru.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/sk.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/sk.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/sl.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/sl.json

5
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/tr.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/tr.json

@ -3,10 +3,7 @@
"texts": { "texts": {
"Menu:Home": "Ana sayfa", "Menu:Home": "Ana sayfa",
"Welcome": "Hoşgeldiniz", "Welcome": "Hoşgeldiniz",
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz.", "LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz.",
"Toolbar:Cart": "Sepetim",
"Toolbar:BasketNotLoaded": "Sepet Hatası!",
"Toolbar:CartEmpty": "Sepetiniz Boş",
"ProductNotFound": "Bu ürün bulunamadı!" "ProductNotFound": "Bu ürün bulunamadı!"
} }
} }

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/vi.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/vi.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/zh-Hans.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/zh-Hans.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketService/zh-Hant.json → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketService/zh-Hant.json

0
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/Localization/BasketServiceResource.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Localization/BasketServiceResource.cs

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/AddProductDto.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/AddProductDto.cs

@ -1,7 +1,7 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class AddProductDto : IHasAnonymousId public class AddProductDto : IHasAnonymousId
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/BasketDto.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/BasketDto.cs

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class BasketDto public class BasketDto
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/BasketItemDto.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/BasketItemDto.cs

@ -1,6 +1,6 @@
using System; using System;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class BasketItemDto public class BasketItemDto
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/IHasAnonymousId.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/IHasAnonymousId.cs

@ -1,6 +1,6 @@
using System; using System;
namespace EShopOnAbp.BasketService namespace EShopOnAbp.BasketService.Services
{ {
public interface IHasAnonymousId public interface IHasAnonymousId
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/RemoveProductDto.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Dtos/RemoveProductDto.cs

@ -1,6 +1,6 @@
using System; using System;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class RemoveProductDto : IHasAnonymousId public class RemoveProductDto : IHasAnonymousId
{ {

2
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketProductUpdatedEto.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Etos/BasketProductUpdatedEto.cs

@ -1,6 +1,6 @@
using System; using System;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class BasketProductUpdatedEto public class BasketProductUpdatedEto
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/IBasketAppService.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/IBasketAppService.cs

@ -2,7 +2,7 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public interface IBasketAppService : IApplicationService public interface IBasketAppService : IApplicationService
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application/IBasketProductService.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/IBasketProductService.cs

@ -3,7 +3,7 @@ using System.Threading.Tasks;
using EShopOnAbp.CatalogService.Products; using EShopOnAbp.CatalogService.Products;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public interface IBasketProductService public interface IBasketProductService
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/Permissions/BasketServicePermissionDefinitionProvider.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Permissions/BasketServicePermissionDefinitionProvider.cs

@ -2,7 +2,7 @@
using Volo.Abp.Authorization.Permissions; using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization; using Volo.Abp.Localization;
namespace EShopOnAbp.BasketService.Permissions namespace EShopOnAbp.BasketService.Services.Permissions
{ {
public class BasketServicePermissionDefinitionProvider : PermissionDefinitionProvider public class BasketServicePermissionDefinitionProvider : PermissionDefinitionProvider
{ {

2
services/basket/src/EShopOnAbp.BasketService.Application.Contracts/Permissions/BasketServicePermissions.cs → services/basket/src/EShopOnAbp.BasketService.Contracts/Services/Permissions/BasketServicePermissions.cs

@ -1,4 +1,4 @@
namespace EShopOnAbp.BasketService.Permissions namespace EShopOnAbp.BasketService.Services.Permissions
{ {
public static class BasketServicePermissions public static class BasketServicePermissions
{ {

8
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceDomainErrorCodes.cs

@ -1,8 +0,0 @@
namespace EShopOnAbp.BasketService
{
public static class BasketServiceDomainErrorCodes
{
/* You can add your business exception error codes here, as constants */
public const string ProductNotFound = "ProductNotFound";
}
}

47
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceDomainSharedModule.cs

@ -1,47 +0,0 @@
using EShopOnAbp.BasketService.Localization;
using EShopOnAbp.OrderingService;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace EShopOnAbp.BasketService
{
[DependsOn(
typeof(AbpValidationModule),
typeof(OrderingServiceDomainSharedModule)
)]
public class BasketServiceDomainSharedModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
BasketServiceGlobalFeatureConfigurator.Configure();
BasketServiceModuleExtensionConfigurator.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BasketServiceDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<BasketServiceResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/BasketService");
options.DefaultResourceType = typeof(BasketServiceResource);
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("BasketService", typeof(BasketServiceResource));
});
}
}
}

23
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceGlobalFeatureConfigurator.cs

@ -1,23 +0,0 @@
using Volo.Abp.Threading;
namespace EShopOnAbp.BasketService
{
public static class BasketServiceGlobalFeatureConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can configure (enable/disable) global features of the used modules here.
*
* YOU CAN SAFELY DELETE THIS CLASS AND REMOVE ITS USAGES IF YOU DON'T NEED TO IT!
*
* Please refer to the documentation to lear more about the Global Features System:
* https://docs.abp.io/en/abp/latest/Global-Features
*/
});
}
}
}

69
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/BasketServiceModuleExtensionConfigurator.cs

@ -1,69 +0,0 @@
using Volo.Abp.Threading;
namespace EShopOnAbp.BasketService
{
public static class BasketServiceModuleExtensionConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
ConfigureExistingProperties();
ConfigureExtraProperties();
});
}
private static void ConfigureExistingProperties()
{
/* You can change max lengths for properties of the
* entities defined in the modules used by your application.
*
* Example: Change user and role name max lengths
IdentityUserConsts.MaxNameLength = 99;
IdentityRoleConsts.MaxNameLength = 99;
* Notice: It is not suggested to change property lengths
* unless you really need it. Go with the standard values wherever possible.
*
* If you are using EF Core, you will need to run the add-migration command after your changes.
*/
}
private static void ConfigureExtraProperties()
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to define these extra properties
* with a high level, easy to use API.
*
* Example: Add a new property to the user entity of the identity module
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>( //property type: string
"SocialSecurityNumber", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
//...other configurations for this property
}
);
});
});
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
*/
}
}
}

28
services/basket/src/EShopOnAbp.BasketService.Domain.Shared/EShopOnAbp.BasketService.Domain.Shared.csproj

@ -1,28 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="5.1.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\ordering\src\EShopOnAbp.OrderingService.Domain.Shared\EShopOnAbp.OrderingService.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\BasketService\*.json" />
<Content Remove="Localization\BasketService\*.json" />
</ItemGroup>
</Project>

35
services/basket/src/EShopOnAbp.BasketService.Domain/BasketServiceDomainModule.cs

@ -1,35 +0,0 @@
using System;
using Microsoft.Extensions.Caching.Distributed;
using Volo.Abp.Caching;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
namespace EShopOnAbp.BasketService
{
[DependsOn(
typeof(BasketServiceDomainSharedModule),
typeof(AbpDddDomainModule),
typeof(AbpCachingModule)
)]
public class BasketServiceDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpDistributedCacheOptions>(options =>
{
options.CacheConfigurators.Add(cacheName =>
{
if (cacheName == CacheNameAttribute.GetCacheName(typeof(Basket)))
{
return new DistributedCacheEntryOptions
{
SlidingExpiration = TimeSpan.FromDays(7)
};
}
return null;
});
});
}
}
}

19
services/basket/src/EShopOnAbp.BasketService.Domain/EShopOnAbp.BasketService.Domain.csproj

@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.BasketService.Domain.Shared\EShopOnAbp.BasketService.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Caching" Version="5.1.2" />
</ItemGroup>
</Project>

3
services/basket/src/EShopOnAbp.BasketService.Domain/Properties/AssemblyInfo.cs

@ -1,3 +0,0 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("EShopOnAbp.BasketService.Domain.Tests")]
[assembly:InternalsVisibleToAttribute("EShopOnAbp.BasketService.TestBase")]

13
services/basket/src/EShopOnAbp.BasketService.Domain/Settings/BasketServiceSettingDefinitionProvider.cs

@ -1,13 +0,0 @@
using Volo.Abp.Settings;
namespace EShopOnAbp.BasketService.Settings
{
public class BasketServiceSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
//Define your own settings here. Example:
//context.Add(new SettingDefinition(BasketServiceSettings.MySetting1));
}
}
}

10
services/basket/src/EShopOnAbp.BasketService.Domain/Settings/BasketServiceSettings.cs

@ -1,10 +0,0 @@
namespace EShopOnAbp.BasketService.Settings
{
public static class BasketServiceSettings
{
private const string Prefix = "BasketService";
//Add your own setting names here. Example:
//public const string MySetting1 = Prefix + ".MySetting1";
}
}

29
services/basket/src/EShopOnAbp.BasketService.HttpApi.Client/BasketServiceHttpApiClientModule.cs

@ -1,29 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace EShopOnAbp.BasketService
{
[DependsOn(
typeof(BasketServiceApplicationContractsModule),
typeof(AbpHttpClientModule)
)]
public class BasketServiceHttpApiClientModule : AbpModule
{
public const string RemoteServiceName = "Basket";
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(
typeof(BasketServiceApplicationContractsModule).Assembly,
RemoteServiceName
);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BasketServiceHttpApiClientModule>();
});
}
}
}

23
services/basket/src/EShopOnAbp.BasketService.HttpApi.Client/EShopOnAbp.BasketService.HttpApi.Client.csproj

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.BasketService.Application.Contracts\EShopOnAbp.BasketService.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="5.1.2" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="**\*generate-proxy.json" />
<Content Remove="**\*generate-proxy.json" />
</ItemGroup>
</Project>

108
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/BasketServiceHttpApiHostModule.cs

@ -1,108 +0,0 @@
using EShopOnAbp.Shared.Hosting.AspNetCore;
using EShopOnAbp.Shared.Hosting.Microservices;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Configuration;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Modularity;
namespace EShopOnAbp.BasketService;
[DependsOn(
typeof(BasketServiceHttpApiModule),
typeof(BasketServiceApplicationModule),
typeof(EShopOnAbpSharedHostingMicroservicesModule)
)]
public class BasketServiceHttpApiHostModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
var configuration = context.Services.GetConfiguration();
var hostingEnvironment = context.Services.GetHostingEnvironment();
JwtBearerConfigurationHelper.Configure(context, "BasketService");
SwaggerWithAuthConfigurationHelper.Configure(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{"BasketService", "Basket Service API"}
},
apiTitle: "Basket Service API"
);
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(
typeof(BasketServiceApplicationModule).Assembly, opts =>
{
opts.RootPath = "basket";
opts.RemoteServiceName = "Basket";
});
});
Configure<AbpAntiForgeryOptions>(options => { options.AutoValidate = false; });
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseCorrelationId();
app.UseCors();
app.UseAbpRequestLocalization();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAbpClaimsMap();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Basket Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();
app.UseUnitOfWork();
app.UseConfiguredEndpoints();
}
}

13
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/Controllers/HomeController.cs

@ -1,13 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EShopOnAbp.BasketService.Controllers
{
public class HomeController : AbpController
{
public ActionResult Index()
{
return Redirect("~/swagger");
}
}
}

28
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj

@ -1,28 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>EShopOnAbp.BasketService-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.BasketService.Application\EShopOnAbp.BasketService.Application.csproj" />
<ProjectReference Include="..\EShopOnAbp.BasketService.HttpApi\EShopOnAbp.BasketService.HttpApi.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.Microservices\EShopOnAbp.Shared.Hosting.Microservices.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

2
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.Development.json

@ -1,2 +0,0 @@
{
}

2
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.secrets.json

@ -1,2 +0,0 @@
{
}

1
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/tempkey.rsa

@ -1 +0,0 @@
{"KeyId":"5eb863b25811a7099f9bc925c0fdf680","Parameters":{"D":"gqn7NAeMkug4twJJHFz/qPseDzQCx7R+6Maj649xrG4vPsMANV9mfR78Er2SuHUS0ZihM2MQEILI5Sf41Uuubv8swCNSE3Dw7GQrBIbTAJ7BZKbQMVgtGkMDtHrtri6d9cOi3EOTSJINICk9r80M49oBMOZihEKascfBSIUYVQvWLEMYfryEiDeFUPbobr10OxF5tZ1unvEKgZe190BdNKWQuFhJelcgsZumjEYNsOz5DHrK73WLhfTy01DmsTKx8i1XVnLtq6W89MqAhMZP9QO9Vj8lR0ANnmdOsY6hJfwUbXiI36t4V9rAZvXR5ESorjb4mnXzT6QPuOfy1fbdSQ==","DP":"ItYIpEqw6aDjDc/swDifUe0Dq6yl4yim3UyQ4B9NBPQR5M6b7D3vbCnvwql4zJK4s+0N4lRViBtkF+20Td1yc2v8S+THCYZCVxCf2e9Q7Ff/sKecJ9/JmdzHkztCfs0xb+4X3CPEQP+JIYtMGmwOLQgE5XgmUYKr0ahZDhYTCwE=","DQ":"v35mgxfyF/nwnWwWlR9cF3mg0v7SyPfKkwdxGaVnGH6G8nPWpPlO+zueflA5QDXEwGtk/1k3PAzI/OLUwJiKBubx/UMhsqt5+/bKTrFDNHxLANCvGNZggMZIzFZBYRucuXRZbiBe5qpCkKkniUct7w6jd/V1mnsESiJZ7btcxU0=","Exponent":"AQAB","InverseQ":"Vbg2a+wtaYvhTV8AzqJsVvaz0kfC4HFbmwEgA8+BAbS3GEoS3RHFSfB3DHndpnNihIg72DctDNLmV2GMMiTu18uyI+7AUaYNR836fByxptfyhPtSQfw4kINZ3V0GWKJGzzZ5NAOct4/FpRl8xliHetayCfUIuK9jwk0z9i6V6bA=","Modulus":"xlzmN1sBi2V1971MsPD5MTND9dAGncIzYqxa3H+9jx1mNDivY6JgKijUWm5a3D2Y1UPMB3kx6qUf3iH6pZHjq5bk938qRhxrPy9muW55U03HTiW4V5/ga0+OqXj5Tj4lz+29OiQHPErxLRgfXT+WBgrGb75ElzkHajKpJnPgzAZuarlUCwupJNQlav/crwOFrgkhGsnaOW13M8htiSLZozw5lxkbhYIei7YTTQZ3l6rVH1dPL8CvzRJJOTwbnU8k0sUmWiuOhrLzuinlr6uuOTocAVgbj943/witVFtN5B0yhetxEVgFCwxRDTOO1EKVHFtCiAyZBUOlK4gwZ+SbGQ==","P":"7dFfbAkZSdx/ieSMYJHoY1DKC4dLg80RObEEmuJ72MaVJLTtFuBPoRpYOrMUNuupIyPjZZsW8fHRlPRhKW7xFv+Q2aDudh1UaJzFZs3xYKoiXTU/j0B3TB3nrifVLMqsS+8kHOWOojwA4dMjI6GCYCpKmYVvMOE1cuJrQ9EYxoM=","Q":"1YdN8mLchLVoTEwD34Pi3T2U7EjjBDgDCzhjl7x5FBG73TyKMz1n7/KXkXcJ2rqIAsnLqCWpYUeRcWl+IQEQxFKoMwkvmQ33lRkOE0SBZ+FnUAMivRyxOD5qM9z4ccqx0ga4ZRgb1lR85f7VYtMSfIosOuSFxWAbV1e29utxhTM="}}

32
services/basket/src/EShopOnAbp.BasketService.HttpApi/BasketServiceHttpApiModule.cs

@ -1,32 +0,0 @@
using EShopOnAbp.BasketService.Localization;
using Localization.Resources.AbpUi;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
namespace EShopOnAbp.BasketService
{
[DependsOn(
typeof(BasketServiceApplicationContractsModule),
typeof(AbpAspNetCoreMvcModule)
)]
public class BasketServiceHttpApiModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureLocalization();
}
private void ConfigureLocalization()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<BasketServiceResource>()
.AddBaseTypes(
typeof(AbpUiResource)
);
});
}
}
}

15
services/basket/src/EShopOnAbp.BasketService.HttpApi/Controllers/BasketServiceController.cs

@ -1,15 +0,0 @@
using EShopOnAbp.BasketService.Localization;
using Volo.Abp.AspNetCore.Mvc;
namespace EShopOnAbp.BasketService.Controllers
{
/* Inherit your controllers from this class.
*/
public abstract class BasketServiceController : AbpControllerBase
{
protected BasketServiceController()
{
LocalizationResource = typeof(BasketServiceResource);
}
}
}

18
services/basket/src/EShopOnAbp.BasketService.HttpApi/EShopOnAbp.BasketService.HttpApi.csproj

@ -1,18 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.BasketService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.BasketService.Application.Contracts\EShopOnAbp.BasketService.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="5.1.2" />
</ItemGroup>
</Project>

14
services/basket/src/EShopOnAbp.BasketService/BasketServiceAutoMapperProfile.cs

@ -0,0 +1,14 @@
using AutoMapper;
using EShopOnAbp.CatalogService.Grpc;
using EShopOnAbp.CatalogService.Products;
namespace EShopOnAbp.BasketService;
public class BasketServiceApplicationAutoMapperProfile : Profile
{
public BasketServiceApplicationAutoMapperProfile()
{
CreateMap<ProductEto, ProductDto>();
CreateMap<ProductResponse, ProductDto>();
}
}

190
services/basket/src/EShopOnAbp.BasketService/BasketServiceModule.cs

@ -0,0 +1,190 @@
using EShopOnAbp.BasketService.Entities;
using EShopOnAbp.CatalogService.Grpc;
using EShopOnAbp.Shared.Hosting.AspNetCore;
using EShopOnAbp.Shared.Hosting.Microservices;
using Microsoft.AspNetCore.Cors;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Options;
using Volo.Abp;
using Volo.Abp.Application;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.AutoMapper;
using Volo.Abp.Caching;
using Volo.Abp.Domain;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace EShopOnAbp.BasketService
{
[DependsOn(
typeof(AbpAspNetCoreMvcModule),
typeof(AbpHttpClientModule),
typeof(AbpAutoMapperModule),
typeof(AbpCachingModule),
typeof(AbpDddApplicationModule),
typeof(AbpDddDomainModule),
typeof(BasketServiceContractsModule),
typeof(EShopOnAbpSharedHostingMicroservicesModule)
)]
public class BasketServiceModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = hostingEnvironment.IsDevelopment();
var configuration = context.Services.GetConfiguration();
ConfigureAutoMapper();
ConfigureAspNetCoreRouting(context);
ConfigureGrpc(context);
ConfigureDistributedCache();
ConfigureVirtualFileSystem();
ConfigureAuthentication(context, configuration);
ConfigureSwagger(context, configuration);
ConfigureAutoApiControllers();
}
private void ConfigureAspNetCoreRouting(ServiceConfigurationContext context)
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(BasketServiceModule).Assembly, opts =>
{
opts.RootPath = "basket";
opts.RemoteServiceName = BasketServiceConstants.RemoteServiceName;
});
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseCorrelationId();
app.UseCors();
app.UseAbpRequestLocalization();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAbpClaimsMap();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Basket Service API");
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
});
app.UseAbpSerilogEnrichers();
app.UseAuditing();
app.UseUnitOfWork();
app.UseConfiguredEndpoints();
}
private void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
{
SwaggerWithAuthConfigurationHelper.Configure(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{"BasketService", "Basket Service API"}
},
apiTitle: "Basket Service API"
);
}
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
JwtBearerConfigurationHelper.Configure(context, "BasketService");
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
Configure<AbpAntiForgeryOptions>(options => { options.AutoValidate = false; });
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(BasketServiceModule).Assembly);
});
}
private void ConfigureGrpc(ServiceConfigurationContext context)
{
context.Services.AddGrpcClient<ProductPublic.ProductPublicClient>((services, options) =>
{
var remoteServiceOptions = services.GetRequiredService<IOptionsMonitor<AbpRemoteServiceOptions>>().CurrentValue;
var catalogServiceConfiguration = remoteServiceOptions.RemoteServices.GetConfigurationOrDefault("Catalog");
var catalogGrpcUrl = catalogServiceConfiguration.GetOrDefault("GrpcUrl");
options.Address = new Uri(catalogGrpcUrl);
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BasketServiceModule>();
});
}
private void ConfigureDistributedCache()
{
Configure<AbpDistributedCacheOptions>(options =>
{
options.CacheConfigurators.Add(cacheName =>
{
if (cacheName == CacheNameAttribute.GetCacheName(typeof(Basket)))
{
return new DistributedCacheEntryOptions
{
SlidingExpiration = TimeSpan.FromDays(7)
};
}
return null;
});
});
}
private void ConfigureVirtualFileSystem()
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BasketServiceModule>();
});
}
}
}

12
services/basket/src/EShopOnAbp.BasketService/Controllers/HomeController.cs

@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EShopOnAbp.BasketService.Controllers;
public class HomeController : AbpController
{
public ActionResult Index()
{
return Redirect("~/swagger");
}
}

6
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/Dockerfile → services/basket/src/EShopOnAbp.BasketService/Dockerfile

@ -24,7 +24,7 @@ COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.cspro
# Microservices # Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" COPY *"services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.csproj" "services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"
COPY *"services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" COPY *"services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj"
@ -38,7 +38,7 @@ COPY "NuGet.Config" "NuGet.Config"
RUN dotnet restore "EShopOnAbp.sln" RUN dotnet restore "EShopOnAbp.sln"
COPY . . COPY . .
WORKDIR "/src/services/basket/src/EShopOnAbp.BasketService.HttpApi.Host" WORKDIR "/src/services/basket/src/EShopOnAbp.BasketService"
RUN dotnet publish -c Release -o /app RUN dotnet publish -c Release -o /app
# Should be used after .net6 is out of preview for better performance # Should be used after .net6 is out of preview for better performance
# RUN dotnet publish --no-restore -c Release -o /app # RUN dotnet publish --no-restore -c Release -o /app
@ -48,4 +48,4 @@ FROM build AS publish
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app . COPY --from=publish /app .
ENTRYPOINT ["dotnet", "EShopOnAbp.BasketService.HttpApi.Host.dll"] ENTRYPOINT ["dotnet", "EShopOnAbp.BasketService.dll"]

2
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/Dockerfile.local → services/basket/src/EShopOnAbp.BasketService/Dockerfile.local

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0 FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/ COPY bin/Release/net6.0/publish/ app/
WORKDIR /app WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.BasketService.HttpApi.Host.dll"] ENTRYPOINT ["dotnet", "EShopOnAbp.BasketService.dll"]

46
services/basket/src/EShopOnAbp.BasketService/EShopOnAbp.BasketService.csproj

@ -0,0 +1,46 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.19.3" />
<PackageReference Include="Grpc.Net.ClientFactory" Version="2.42.0" />
<PackageReference Include="Grpc.Tools" Version="2.42.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="5.1.2" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="5.1.2" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Caching" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="5.1.2" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="5.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.BasketService.Contracts\EShopOnAbp.BasketService.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.Microservices\EShopOnAbp.Shared.Hosting.Microservices.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="**\*generate-proxy.json" />
<Content Remove="**\*generate-proxy.json" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="..\..\..\catalog\src\EShopOnAbp.CatalogService.Application.Contracts\Protos\product.proto" GrpcServices="Client" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

5
services/basket/src/EShopOnAbp.BasketService.Domain/Basket.cs → services/basket/src/EShopOnAbp.BasketService/Entities/Basket.cs

@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Volo.Abp.Domain.Entities; using Volo.Abp.Domain.Entities;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Entities;
public class Basket : AggregateRoot<Guid> public class Basket : AggregateRoot<Guid>
{ {

4
services/basket/src/EShopOnAbp.BasketService.Domain/BasketItem.cs → services/basket/src/EShopOnAbp.BasketService/Entities/BasketItem.cs

@ -1,6 +1,4 @@
using System; namespace EShopOnAbp.BasketService.Entities;
namespace EShopOnAbp.BasketService;
public class BasketItem public class BasketItem
{ {

6
services/basket/src/EShopOnAbp.BasketService.Domain/BasketRepository.cs → services/basket/src/EShopOnAbp.BasketService/Entities/BasketRepository.cs

@ -1,8 +1,6 @@
using System; using Volo.Abp.Caching;
using System.Threading.Tasks;
using Volo.Abp.Caching;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Entities;
public class BasketRepository : IBasketRepository public class BasketRepository : IBasketRepository
{ {

4
services/basket/src/EShopOnAbp.BasketService.Domain/IBasketRepository.cs → services/basket/src/EShopOnAbp.BasketService/Entities/IBasketRepository.cs

@ -1,8 +1,6 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Entities;
public interface IBasketRepository : IRepository public interface IBasketRepository : IRepository
{ {

3
services/basket/src/EShopOnAbp.BasketService.Domain/Orders/OrderPlacedEventHandler.cs → services/basket/src/EShopOnAbp.BasketService/Entities/Orders/OrderPlacedEventHandler.cs

@ -1,10 +1,9 @@
using EShopOnAbp.OrderingService.Orders; using EShopOnAbp.OrderingService.Orders;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.Uow; using Volo.Abp.Uow;
namespace EShopOnAbp.BasketService.Orders namespace EShopOnAbp.BasketService.Entities.Orders
{ {
public class OrderPlacedEventHandler : IDistributedEventHandler<OrderPlacedEto>, ITransientDependency public class OrderPlacedEventHandler : IDistributedEventHandler<OrderPlacedEto>, ITransientDependency
{ {

5
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/Program.cs → services/basket/src/EShopOnAbp.BasketService/Program.cs

@ -1,7 +1,4 @@
using System;
using System.Threading.Tasks;
using EShopOnAbp.Shared.Hosting.AspNetCore; using EShopOnAbp.Shared.Hosting.AspNetCore;
using Microsoft.AspNetCore.Builder;
using Serilog; using Serilog;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService;
@ -18,7 +15,7 @@ public class Program
{ {
Log.Information($"Starting {assemblyName}."); Log.Information($"Starting {assemblyName}.");
var app = await ApplicationBuilderHelper var app = await ApplicationBuilderHelper
.BuildApplicationAsync<BasketServiceHttpApiHostModule>(args); .BuildApplicationAsync<BasketServiceModule>(args);
await app.InitializeApplicationAsync(); await app.InitializeApplicationAsync();
await app.RunAsync(); await app.RunAsync();

18
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/Properties/launchSettings.json → services/basket/src/EShopOnAbp.BasketService/Properties/launchSettings.json

@ -1,27 +1,27 @@
{ {
"iisSettings": { "iisSettings": {
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "https://localhost:44355", "applicationUrl": "https://localhost:44355"
"sslPort": 44355
} }
}, },
"profiles": { "profiles": {
"IIS Express": { "EShopOnAbp.BasketService": {
"commandName": "IISExpress", "commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "https://localhost:44355",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
}, },
"EShopOnAbp.BasketService.HttpApi.Host": { "IIS Express": {
"commandName": "Project", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "https://localhost:44355",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
} }
} }
} }

14
services/basket/src/EShopOnAbp.BasketService.Application/BasketAppService.cs → services/basket/src/EShopOnAbp.BasketService/Services/BasketAppService.cs

@ -1,14 +1,13 @@
using System; using EShopOnAbp.BasketService.Entities;
using System.Collections.Generic; using EShopOnAbp.BasketService.Localization;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Users;
using EShopOnAbp.CatalogService.Products; using EShopOnAbp.CatalogService.Products;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Application.Services;
using Volo.Abp.Users;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class BasketAppService : BasketServiceAppService, IBasketAppService public class BasketAppService : ApplicationService, IBasketAppService
{ {
private readonly IBasketRepository _basketRepository; private readonly IBasketRepository _basketRepository;
private readonly IBasketProductService _basketProductService; private readonly IBasketProductService _basketProductService;
@ -19,6 +18,7 @@ public class BasketAppService : BasketServiceAppService, IBasketAppService
{ {
_basketRepository = basketRepository; _basketRepository = basketRepository;
_basketProductService = basketProductService; _basketProductService = basketProductService;
LocalizationResource = typeof(BasketServiceResource);
} }
public async Task<BasketDto> GetAsync(Guid? anonymousUserId) public async Task<BasketDto> GetAsync(Guid? anonymousUserId)

6
services/basket/src/EShopOnAbp.BasketService.Application/BasketProductEventHandler.cs → services/basket/src/EShopOnAbp.BasketService/Services/BasketProductEventHandler.cs

@ -1,13 +1,11 @@
using System; using EShopOnAbp.CatalogService.Products;
using System.Threading.Tasks;
using EShopOnAbp.CatalogService.Products;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Entities.Events.Distributed; using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.EventBus.Distributed; using Volo.Abp.EventBus.Distributed;
using Volo.Abp.ObjectMapping; using Volo.Abp.ObjectMapping;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class BasketProductEventHandler : IDistributedEventHandler<EntityUpdatedEto<ProductEto>>, ITransientDependency public class BasketProductEventHandler : IDistributedEventHandler<EntityUpdatedEto<ProductEto>>, ITransientDependency
{ {

7
services/basket/src/EShopOnAbp.BasketService.Application/BasketProductService.cs → services/basket/src/EShopOnAbp.BasketService/Services/BasketProductService.cs

@ -1,14 +1,11 @@
using System;
using System.Threading.Tasks;
using EShopOnAbp.CatalogService.Grpc; using EShopOnAbp.CatalogService.Grpc;
using EShopOnAbp.CatalogService.Products; using EShopOnAbp.CatalogService.Products;
using Microsoft.Extensions.Logging;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Caching; using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.ObjectMapping;
namespace EShopOnAbp.BasketService; namespace EShopOnAbp.BasketService.Services;
public class BasketProductService : IBasketProductService, ITransientDependency public class BasketProductService : IBasketProductService, ITransientDependency
{ {

8
services/basket/src/EShopOnAbp.BasketService/appsettings.Development.json

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

0
services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/appsettings.json → services/basket/src/EShopOnAbp.BasketService/appsettings.json

7
services/basket/test/EShopOnAbp.BasketService.Application.Tests/BasketServiceApplicationTestBase.cs

@ -1,7 +0,0 @@
namespace EShopOnAbp.BasketService
{
public abstract class BasketServiceApplicationTestBase : BasketServiceTestBase<BasketServiceApplicationTestModule>
{
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save