From 059908664b3f7f6971f534832efbec582866c1d1 Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 25 Dec 2025 16:42:17 +0800 Subject: [PATCH] feat(platform): Add a global data dic interface --- .../LINGYUN/Platform/Datas/IDataAppService.cs | 43 +- .../Platform/Datas/IGlobalDataAppService.cs | 29 + .../Platform/Datas/GlobalDataAppService.cs | 54 ++ .../Datas/GlobalDataClientProxy.Generated.cs | 40 ++ .../Platform/Datas/GlobalDataClientProxy.cs | 7 + .../Portal/EnterpriseClientProxy.Generated.cs | 60 ++ .../Platform/Portal/EnterpriseClientProxy.cs | 7 + .../platform-generate-proxy.json | 621 ++++++++++++++++++ .../Platform/Datas/GlobalDataController.cs | 43 ++ 9 files changed, 898 insertions(+), 6 deletions(-) create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IGlobalDataAppService.cs create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/GlobalDataAppService.cs create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.Generated.cs create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.cs create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.Generated.cs create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.cs create mode 100644 aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/GlobalDataController.cs diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs index a25f42cd5..ada2edc34 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs @@ -4,7 +4,9 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; namespace LINGYUN.Platform.Datas; - +/// +/// 数据字典应用服务接口 +/// public interface IDataAppService : ICrudAppService< DataDto, @@ -13,15 +15,44 @@ public interface IDataAppService : DataCreateDto, DataUpdateDto> { + /// + /// 获取数据字典 + /// + /// 名称 + /// Task GetAsync(string name); - + /// + /// 获取所有数据字典 + /// + /// Task> GetAllAsync(); - + /// + /// 移除数据字典 + /// + /// 字典Id + /// + /// Task MoveAsync(Guid id, DataMoveDto input); - + /// + /// 新增数据字典项目 + /// + /// 字典Id + /// + /// Task CreateItemAsync(Guid id, DataItemCreateDto input); - + /// + /// 更新数据字典项目 + /// + /// 字典Id + /// 项目名称 + /// + /// Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input); - + /// + /// 删除数据字典项目 + /// + /// 字典Id + /// 项目名称 + /// Task DeleteItemAsync(Guid id, string name); } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IGlobalDataAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IGlobalDataAppService.cs new file mode 100644 index 000000000..3e2e7eecb --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IGlobalDataAppService.cs @@ -0,0 +1,29 @@ +using System; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; + +namespace LINGYUN.Platform.Datas; +/// +/// 公用数据字典应用服务接口 +/// +public interface IGlobalDataAppService : IApplicationService +{ + /// + /// 获取数据字典 + /// + /// 名称 + /// + Task GetByNameAsync(string name); + /// + /// 获取数据字典 + /// + /// Id + /// + Task GetAsync(Guid id); + /// + /// 获取所有数据字典 + /// + /// + Task> GetAllAsync(); +} diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/GlobalDataAppService.cs b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/GlobalDataAppService.cs new file mode 100644 index 000000000..21810f2f6 --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/GlobalDataAppService.cs @@ -0,0 +1,54 @@ +using LINGYUN.Platform.Permissions; +using Microsoft.AspNetCore.Authorization; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Domain.Entities; +using Volo.Abp.MultiTenancy; + +namespace LINGYUN.Platform.Datas; + +[Authorize(PlatformPermissions.DataDictionary.Default)] +public class GlobalDataAppService : PlatformApplicationServiceBase, IGlobalDataAppService +{ + protected IDataRepository DataRepository { get; } + + public GlobalDataAppService( + IDataRepository dataRepository) + { + DataRepository = dataRepository; + } + + public async virtual Task GetByNameAsync(string name) + { + using (DataFilter.Disable()) + { + var data = await DataRepository.FindByNameAsync(name) ?? + throw new EntityNotFoundException(typeof(Data), name); + + return ObjectMapper.Map(data); + } + } + + public async virtual Task GetAsync(Guid id) + { + using (DataFilter.Disable()) + { + var data = await DataRepository.GetAsync(id); + + return ObjectMapper.Map(data); + } + } + + public async virtual Task> GetAllAsync() + { + using (DataFilter.Disable()) + { + var datas = await DataRepository.GetListAsync(includeDetails: false); + + return new ListResultDto( + ObjectMapper.Map, List>(datas)); + } + } +} diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.Generated.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.Generated.cs new file mode 100644 index 000000000..41415cd66 --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.Generated.cs @@ -0,0 +1,40 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using LINGYUN.Platform.Datas; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Http.Modeling; + +// ReSharper disable once CheckNamespace +namespace LINGYUN.Platform.Datas; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(IGlobalDataAppService), typeof(GlobalDataClientProxy))] +public partial class GlobalDataClientProxy : ClientProxyBase, IGlobalDataAppService +{ + public virtual async Task GetByNameAsync(string name) + { + return await RequestAsync(nameof(GetByNameAsync), new ClientProxyRequestTypeValue + { + { typeof(string), name } + }); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); + } + + public virtual async Task> GetAllAsync() + { + return await RequestAsync>(nameof(GetAllAsync)); + } +} diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.cs new file mode 100644 index 000000000..afb598370 --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.cs @@ -0,0 +1,7 @@ +// This file is part of GlobalDataClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace LINGYUN.Platform.Datas; + +public partial class GlobalDataClientProxy +{ +} diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.Generated.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.Generated.cs new file mode 100644 index 000000000..f5812dc2f --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.Generated.cs @@ -0,0 +1,60 @@ +// This file is automatically generated by ABP framework to use MVC Controllers from CSharp +using LINGYUN.Platform.Portal; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Http.Client; +using Volo.Abp.Http.Client.ClientProxying; +using Volo.Abp.Http.Modeling; + +// ReSharper disable once CheckNamespace +namespace LINGYUN.Platform.Portal; + +[Dependency(ReplaceServices = true)] +[ExposeServices(typeof(IEnterpriseAppService), typeof(EnterpriseClientProxy))] +public partial class EnterpriseClientProxy : ClientProxyBase, IEnterpriseAppService +{ + public virtual async Task CreateAsync(EnterpriseCreateDto input) + { + return await RequestAsync(nameof(CreateAsync), new ClientProxyRequestTypeValue + { + { typeof(EnterpriseCreateDto), input } + }); + } + + public virtual async Task DeleteAsync(Guid id) + { + await RequestAsync(nameof(DeleteAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); + } + + public virtual async Task GetAsync(Guid id) + { + return await RequestAsync(nameof(GetAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id } + }); + } + + public virtual async Task> GetListAsync(EnterpriseGetListInput input) + { + return await RequestAsync>(nameof(GetListAsync), new ClientProxyRequestTypeValue + { + { typeof(EnterpriseGetListInput), input } + }); + } + + public virtual async Task UpdateAsync(Guid id, EnterpriseUpdateDto input) + { + return await RequestAsync(nameof(UpdateAsync), new ClientProxyRequestTypeValue + { + { typeof(Guid), id }, + { typeof(EnterpriseUpdateDto), input } + }); + } +} diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.cs new file mode 100644 index 000000000..d1d5edc74 --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.cs @@ -0,0 +1,7 @@ +// This file is part of EnterpriseClientProxy, you can customize it here +// ReSharper disable once CheckNamespace +namespace LINGYUN.Platform.Portal; + +public partial class EnterpriseClientProxy +{ +} diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/platform-generate-proxy.json b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/platform-generate-proxy.json index 9ea5d301b..af8d37d5b 100644 --- a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/platform-generate-proxy.json +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/platform-generate-proxy.json @@ -789,6 +789,155 @@ } } }, + "LINGYUN.Platform.Datas.GlobalDataController": { + "controllerName": "GlobalData", + "controllerGroupName": "GlobalData", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "LINGYUN.Platform.Datas.GlobalDataController", + "interfaces": [ + { + "type": "LINGYUN.Platform.Datas.IGlobalDataAppService", + "name": "IGlobalDataAppService", + "methods": [ + { + "name": "GetByNameAsync", + "parametersOnMethod": [ + { + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Datas.DataDto", + "typeSimple": "LINGYUN.Platform.Datas.DataDto" + } + }, + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Datas.DataDto", + "typeSimple": "LINGYUN.Platform.Datas.DataDto" + } + }, + { + "name": "GetAllAsync", + "parametersOnMethod": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + } + } + ] + } + ], + "actions": { + "GetByNameAsyncByName": { + "uniqueName": "GetByNameAsyncByName", + "name": "GetByNameAsync", + "httpMethod": "GET", + "url": "api/platform/global-datas/by-name/{name}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "name", + "typeAsString": "System.String, System.Private.CoreLib", + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "name", + "name": "name", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Datas.DataDto", + "typeSimple": "LINGYUN.Platform.Datas.DataDto" + }, + "allowAnonymous": null, + "implementFrom": "LINGYUN.Platform.Datas.IGlobalDataAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/platform/global-datas/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Datas.DataDto", + "typeSimple": "LINGYUN.Platform.Datas.DataDto" + }, + "allowAnonymous": null, + "implementFrom": "LINGYUN.Platform.Datas.IGlobalDataAppService" + }, + "GetAllAsync": { + "uniqueName": "GetAllAsync", + "name": "GetAllAsync", + "httpMethod": "GET", + "url": "api/platform/global-datas/all", + "supportedVersions": [], + "parametersOnMethod": [], + "parameters": [], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.ListResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.ListResultDto" + }, + "allowAnonymous": null, + "implementFrom": "LINGYUN.Platform.Datas.IGlobalDataAppService" + } + } + }, "LINGYUN.Platform.Feedbacks.FeedbackAttachmentController": { "controllerName": "FeedbackAttachment", "controllerGroupName": "FeedbackAttachment", @@ -3677,6 +3826,18 @@ "bindingSourceId": "ModelBinding", "descriptorName": "input" }, + { + "nameOnMethod": "input", + "name": "Status", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { "nameOnMethod": "input", "name": "Priority", @@ -3689,6 +3850,30 @@ "bindingSourceId": "ModelBinding", "descriptorName": "input" }, + { + "nameOnMethod": "input", + "name": "BeginSendTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "EndSendTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { "nameOnMethod": "input", "name": "Sorting", @@ -4259,6 +4444,42 @@ "bindingSourceId": "ModelBinding", "descriptorName": "input" }, + { + "nameOnMethod": "input", + "name": "Status", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "BeginSendTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "EndSendTime", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, { "nameOnMethod": "input", "name": "Sorting", @@ -5173,6 +5394,406 @@ "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" } } + }, + "LINGYUN.Platform.Portal.EnterpriseController": { + "controllerName": "Enterprise", + "controllerGroupName": "Enterprise", + "isRemoteService": true, + "isIntegrationService": false, + "apiVersion": null, + "type": "LINGYUN.Platform.Portal.EnterpriseController", + "interfaces": [ + { + "type": "LINGYUN.Platform.Portal.IEnterpriseAppService", + "name": "IEnterpriseAppService", + "methods": [ + { + "name": "GetAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Portal.EnterpriseDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseDto" + } + }, + { + "name": "GetListAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "LINGYUN.Platform.Portal.EnterpriseGetListInput, LINGYUN.Platform.Application.Contracts", + "type": "LINGYUN.Platform.Portal.EnterpriseGetListInput", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseGetListInput", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + } + }, + { + "name": "CreateAsync", + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "LINGYUN.Platform.Portal.EnterpriseCreateDto, LINGYUN.Platform.Application.Contracts", + "type": "LINGYUN.Platform.Portal.EnterpriseCreateDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Portal.EnterpriseDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseDto" + } + }, + { + "name": "UpdateAsync", + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "LINGYUN.Platform.Portal.EnterpriseUpdateDto, LINGYUN.Platform.Application.Contracts", + "type": "LINGYUN.Platform.Portal.EnterpriseUpdateDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Portal.EnterpriseDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseDto" + } + }, + { + "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": { + "CreateAsyncByInput": { + "uniqueName": "CreateAsyncByInput", + "name": "CreateAsync", + "httpMethod": "POST", + "url": "api/platform/enterprise", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "LINGYUN.Platform.Portal.EnterpriseCreateDto, LINGYUN.Platform.Application.Contracts", + "type": "LINGYUN.Platform.Portal.EnterpriseCreateDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseCreateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "LINGYUN.Platform.Portal.EnterpriseCreateDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseCreateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Portal.EnterpriseDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.ICreateAppService" + }, + "DeleteAsyncById": { + "uniqueName": "DeleteAsyncById", + "name": "DeleteAsync", + "httpMethod": "DELETE", + "url": "api/platform/enterprise/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "System.Void", + "typeSimple": "System.Void" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IDeleteAppService" + }, + "GetAsyncById": { + "uniqueName": "GetAsyncById", + "name": "GetAsync", + "httpMethod": "GET", + "url": "api/platform/enterprise/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Portal.EnterpriseDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "GetListAsyncByInput": { + "uniqueName": "GetListAsyncByInput", + "name": "GetListAsync", + "httpMethod": "GET", + "url": "api/platform/enterprise", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "input", + "typeAsString": "LINGYUN.Platform.Portal.EnterpriseGetListInput, LINGYUN.Platform.Application.Contracts", + "type": "LINGYUN.Platform.Portal.EnterpriseGetListInput", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseGetListInput", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "input", + "name": "Filter", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "BeginRegistrationDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "EndRegistrationDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "BeginExpirationDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "EndExpirationDate", + "jsonName": null, + "type": "System.DateTime?", + "typeSimple": "string?", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "Sorting", + "jsonName": null, + "type": "System.String", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "SkipCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + }, + { + "nameOnMethod": "input", + "name": "MaxResultCount", + "jsonName": null, + "type": "System.Int32", + "typeSimple": "number", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "ModelBinding", + "descriptorName": "input" + } + ], + "returnValue": { + "type": "Volo.Abp.Application.Dtos.PagedResultDto", + "typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService" + }, + "UpdateAsyncByIdAndInput": { + "uniqueName": "UpdateAsyncByIdAndInput", + "name": "UpdateAsync", + "httpMethod": "PUT", + "url": "api/platform/enterprise/{id}", + "supportedVersions": [], + "parametersOnMethod": [ + { + "name": "id", + "typeAsString": "System.Guid, System.Private.CoreLib", + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null + }, + { + "name": "input", + "typeAsString": "LINGYUN.Platform.Portal.EnterpriseUpdateDto, LINGYUN.Platform.Application.Contracts", + "type": "LINGYUN.Platform.Portal.EnterpriseUpdateDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseUpdateDto", + "isOptional": false, + "defaultValue": null + } + ], + "parameters": [ + { + "nameOnMethod": "id", + "name": "id", + "jsonName": null, + "type": "System.Guid", + "typeSimple": "string", + "isOptional": false, + "defaultValue": null, + "constraintTypes": [], + "bindingSourceId": "Path", + "descriptorName": "" + }, + { + "nameOnMethod": "input", + "name": "input", + "jsonName": null, + "type": "LINGYUN.Platform.Portal.EnterpriseUpdateDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseUpdateDto", + "isOptional": false, + "defaultValue": null, + "constraintTypes": null, + "bindingSourceId": "Body", + "descriptorName": "" + } + ], + "returnValue": { + "type": "LINGYUN.Platform.Portal.EnterpriseDto", + "typeSimple": "LINGYUN.Platform.Portal.EnterpriseDto" + }, + "allowAnonymous": false, + "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService" + } + } } } } diff --git a/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/GlobalDataController.cs b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/GlobalDataController.cs new file mode 100644 index 000000000..11427f9fe --- /dev/null +++ b/aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/GlobalDataController.cs @@ -0,0 +1,43 @@ +using Microsoft.AspNetCore.Mvc; +using System; +using System.Threading.Tasks; +using Volo.Abp; +using Volo.Abp.Application.Dtos; +using Volo.Abp.AspNetCore.Mvc; + +namespace LINGYUN.Platform.Datas; + +[Area("platform")] +[Route("api/platform/global-datas")] +[RemoteService(Name = PlatformRemoteServiceConsts.RemoteServiceName)] +public class GlobalDataController : AbpControllerBase, IGlobalDataAppService +{ + protected IGlobalDataAppService DataAppService { get; } + + public GlobalDataController( + IGlobalDataAppService dataAppService) + { + DataAppService = dataAppService; + } + + [HttpGet] + [Route("by-name/{name}")] + public async virtual Task GetByNameAsync(string name) + { + return await DataAppService.GetByNameAsync(name); + } + + [HttpGet] + [Route("{id}")] + public async virtual Task GetAsync(Guid id) + { + return await DataAppService.GetAsync(id); + } + + [HttpGet] + [Route("all")] + public async virtual Task> GetAllAsync() + { + return await DataAppService.GetAllAsync(); + } +}