diff --git a/aspire/AppHost/Program.cs b/aspire/AppHost/Program.cs index ebf59967..2bf8b397 100644 --- a/aspire/AppHost/Program.cs +++ b/aspire/AppHost/Program.cs @@ -6,7 +6,7 @@ var administrationService = var identityService = builder.AddProject("identityService"); var catalogService = builder.AddProject("catalogService"); var basketService = builder.AddProject("basketService") - .WithReference(catalogService); + .WithReference(catalogService); //? var cmsKitService = builder.AddProject("cmsKitService"); var orderingService = builder.AddProject("orderingService"); var paymentService = builder.AddProject("paymentService"); diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs b/services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs deleted file mode 100644 index 5259c22e..00000000 --- a/services/cmskit/src/EShopOnAbp.CmskitService.Application/Samples/SampleAppService.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authorization; - -namespace EShopOnAbp.CmskitService.Samples; - -public class SampleAppService : CmskitServiceAppService, ISampleAppService -{ - public Task GetAsync() - { - return Task.FromResult( - new SampleDto - { - Value = 42 - } - ); - } - - [Authorize] - public Task GetAuthorizedAsync() - { - return Task.FromResult( - new SampleDto - { - Value = 42 - } - ); - } -} diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.Generated.cs similarity index 95% rename from services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs rename to services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.Generated.cs index b7b1afc5..ad798ede 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.Generated.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.Generated.cs @@ -1,15 +1,17 @@ // This file is automatically generated by ABP framework to use MVC Controllers from CSharp using System; +using System.Collections.Generic; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Application.Dtos; -using Volo.Abp.Http.Client; -using Volo.Abp.Http.Modeling; using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client; using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Http.Modeling; using Volo.CmsKit.Public.Comments; // ReSharper disable once CheckNamespace -namespace Volo.CmsKit.Public.Comments.ClientProxies; +namespace Volo.CmsKit.Public.Comments; [Dependency(ReplaceServices = true)] [ExposeServices(typeof(ICommentPublicAppService), typeof(CommentPublicClientProxy))] diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.cs similarity index 76% rename from services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs rename to services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.cs index 826d4c0f..391b85cf 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/CommentPublicClientProxy.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Comments/CommentPublicClientProxy.cs @@ -1,6 +1,6 @@ // This file is part of CommentPublicClientProxy, you can customize it here // ReSharper disable once CheckNamespace -namespace Volo.CmsKit.Public.Comments.ClientProxies; +namespace Volo.CmsKit.Public.Comments; public partial class CommentPublicClientProxy { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.Generated.cs similarity index 96% rename from services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs rename to services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.Generated.cs index 583d86a2..5d72b7e9 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.Generated.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.Generated.cs @@ -1,16 +1,17 @@ // This file is automatically generated by ABP framework to use MVC Controllers from CSharp using System; +using System.Collections.Generic; using System.Threading.Tasks; +using Volo.Abp; using Volo.Abp.Application.Dtos; -using Volo.Abp.Http.Client; -using Volo.Abp.Http.Modeling; using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client; using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Http.Modeling; using Volo.CmsKit.Public.Ratings; -using System.Collections.Generic; // ReSharper disable once CheckNamespace -namespace Volo.CmsKit.Public.Ratings.ClientProxies; +namespace Volo.CmsKit.Public.Ratings; [Dependency(ReplaceServices = true)] [ExposeServices(typeof(IRatingPublicAppService), typeof(RatingPublicClientProxy))] diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.cs similarity index 76% rename from services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs rename to services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.cs index 6a4609f5..ae04e16b 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/RatingPublicClientProxy.cs +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/Volo/CmsKit/Public/Ratings/RatingPublicClientProxy.cs @@ -1,6 +1,6 @@ // This file is part of RatingPublicClientProxy, you can customize it here // ReSharper disable once CheckNamespace -namespace Volo.CmsKit.Public.Ratings.ClientProxies; +namespace Volo.CmsKit.Public.Ratings; public partial class RatingPublicClientProxy { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json index aa9ddbdd..66663515 100644 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json +++ b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi.Client/ClientProxies/cms-kit-generate-proxy.json @@ -7,12 +7,99 @@ "Volo.CmsKit.Public.Ratings.RatingPublicController": { "controllerName": "RatingPublic", "controllerGroupName": "RatingPublic", - "isRemoteService": false, + "isRemoteService": true, + "isIntegrationService": false, "apiVersion": null, "type": "Volo.CmsKit.Public.Ratings.RatingPublicController", "interfaces": [ { - "type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService" + "type": "Volo.CmsKit.Public.Ratings.IRatingPublicAppService", + "name": "IRatingPublicAppService", + "methods": [ + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "typeSimple": "Volo.CmsKit.Public.Ratings.CreateUpdateRatingInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Ratings.RatingDto", + "typeSimple": "Volo.CmsKit.Public.Ratings.RatingDto" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + }, + { + "name": "GetGroupedStarCountsAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Collections.Generic.List", + "typeSimple": "[Volo.CmsKit.Public.Ratings.RatingWithStarCountDto]" + } + } + ] } ], "actions": { @@ -212,12 +299,116 @@ "Volo.CmsKit.Public.Comments.CommentPublicController": { "controllerName": "CommentPublic", "controllerGroupName": "CommentPublic", - "isRemoteService": false, + "isRemoteService": true, + "isIntegrationService": false, "apiVersion": null, "type": "Volo.CmsKit.Public.Comments.CommentPublicController", "interfaces": [ { - "type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService" + "type": "Volo.CmsKit.Public.Comments.ICommentPublicAppService", + "name": "ICommentPublicAppService", + "methods": [ + { + "name": "GetListAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + }, + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "entityType", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "entityId", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.CreateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.CreateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "Volo.CmsKit.Public.Comments.UpdateCommentInput, Volo.CmsKit.Public.Application.Contracts", + "type": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "typeSimple": "Volo.CmsKit.Public.Comments.UpdateCommentInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.CmsKit.Public.Comments.CommentDto", + "typeSimple": "Volo.CmsKit.Public.Comments.CommentDto" + } + }, + { + "name": "DeleteAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + } + } + ] } ], "actions": { diff --git a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs b/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs deleted file mode 100644 index f332db58..00000000 --- a/services/cmskit/src/EShopOnAbp.CmskitService.HttpApi/Samples/SampleController.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using Volo.Abp; - -namespace EShopOnAbp.CmskitService.Samples; - -[RemoteService(Name = CmskitServiceRemoteServiceConsts.RemoteServiceName)] -[Area("CmskitService")] -[ControllerName("CmskitService")] -[Route("api/CmskitService/sample")] -public class SampleController : CmskitServiceController, ISampleAppService -{ - private readonly ISampleAppService _sampleAppService; - - public SampleController(ISampleAppService sampleAppService) - { - _sampleAppService = sampleAppService; - } - - [HttpGet] - public async Task GetAsync() - { - return await _sampleAppService.GetAsync(); - } - - [HttpGet] - [Route("authorized")] - [Authorize] - public async Task GetAuthorizedAsync() - { - return await _sampleAppService.GetAsync(); - } -}