Browse Source

feat(platform): Add a global data dic interface

pull/1405/head
colin 3 months ago
parent
commit
059908664b
  1. 43
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IDataAppService.cs
  2. 29
      aspnet-core/modules/platform/LINGYUN.Platform.Application.Contracts/LINGYUN/Platform/Datas/IGlobalDataAppService.cs
  3. 54
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Datas/GlobalDataAppService.cs
  4. 40
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.Generated.cs
  5. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Datas/GlobalDataClientProxy.cs
  6. 60
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.Generated.cs
  7. 7
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/LINGYUN/Platform/Portal/EnterpriseClientProxy.cs
  8. 621
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi.Client/ClientProxies/platform-generate-proxy.json
  9. 43
      aspnet-core/modules/platform/LINGYUN.Platform.HttpApi/LINGYUN/Platform/Datas/GlobalDataController.cs

43
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; using Volo.Abp.Application.Services;
namespace LINGYUN.Platform.Datas; namespace LINGYUN.Platform.Datas;
/// <summary>
/// 数据字典应用服务接口
/// </summary>
public interface IDataAppService : public interface IDataAppService :
ICrudAppService< ICrudAppService<
DataDto, DataDto,
@ -13,15 +15,44 @@ public interface IDataAppService :
DataCreateDto, DataCreateDto,
DataUpdateDto> DataUpdateDto>
{ {
/// <summary>
/// 获取数据字典
/// </summary>
/// <param name="name">名称</param>
/// <returns></returns>
Task<DataDto> GetAsync(string name); Task<DataDto> GetAsync(string name);
/// <summary>
/// 获取所有数据字典
/// </summary>
/// <returns></returns>
Task<ListResultDto<DataDto>> GetAllAsync(); Task<ListResultDto<DataDto>> GetAllAsync();
/// <summary>
/// 移除数据字典
/// </summary>
/// <param name="id">字典Id</param>
/// <param name="input"></param>
/// <returns></returns>
Task<DataDto> MoveAsync(Guid id, DataMoveDto input); Task<DataDto> MoveAsync(Guid id, DataMoveDto input);
/// <summary>
/// 新增数据字典项目
/// </summary>
/// <param name="id">字典Id</param>
/// <param name="input"></param>
/// <returns></returns>
Task CreateItemAsync(Guid id, DataItemCreateDto input); Task CreateItemAsync(Guid id, DataItemCreateDto input);
/// <summary>
/// 更新数据字典项目
/// </summary>
/// <param name="id">字典Id</param>
/// <param name="name">项目名称</param>
/// <param name="input"></param>
/// <returns></returns>
Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input); Task UpdateItemAsync(Guid id, string name, DataItemUpdateDto input);
/// <summary>
/// 删除数据字典项目
/// </summary>
/// <param name="id">字典Id</param>
/// <param name="name">项目名称</param>
/// <returns></returns>
Task DeleteItemAsync(Guid id, string name); Task DeleteItemAsync(Guid id, string name);
} }

29
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;
/// <summary>
/// 公用数据字典应用服务接口
/// </summary>
public interface IGlobalDataAppService : IApplicationService
{
/// <summary>
/// 获取数据字典
/// </summary>
/// <param name="name">名称</param>
/// <returns></returns>
Task<DataDto> GetByNameAsync(string name);
/// <summary>
/// 获取数据字典
/// </summary>
/// <param name="id">Id</param>
/// <returns></returns>
Task<DataDto> GetAsync(Guid id);
/// <summary>
/// 获取所有数据字典
/// </summary>
/// <returns></returns>
Task<ListResultDto<DataDto>> GetAllAsync();
}

54
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<DataDto> GetByNameAsync(string name)
{
using (DataFilter.Disable<IMultiTenant>())
{
var data = await DataRepository.FindByNameAsync(name) ??
throw new EntityNotFoundException(typeof(Data), name);
return ObjectMapper.Map<Data, DataDto>(data);
}
}
public async virtual Task<DataDto> GetAsync(Guid id)
{
using (DataFilter.Disable<IMultiTenant>())
{
var data = await DataRepository.GetAsync(id);
return ObjectMapper.Map<Data, DataDto>(data);
}
}
public async virtual Task<ListResultDto<DataDto>> GetAllAsync()
{
using (DataFilter.Disable<IMultiTenant>())
{
var datas = await DataRepository.GetListAsync(includeDetails: false);
return new ListResultDto<DataDto>(
ObjectMapper.Map<List<Data>, List<DataDto>>(datas));
}
}
}

40
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>, IGlobalDataAppService
{
public virtual async Task<DataDto> GetByNameAsync(string name)
{
return await RequestAsync<DataDto>(nameof(GetByNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), name }
});
}
public virtual async Task<DataDto> GetAsync(Guid id)
{
return await RequestAsync<DataDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<ListResultDto<DataDto>> GetAllAsync()
{
return await RequestAsync<ListResultDto<DataDto>>(nameof(GetAllAsync));
}
}

7
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
{
}

60
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>, IEnterpriseAppService
{
public virtual async Task<EnterpriseDto> CreateAsync(EnterpriseCreateDto input)
{
return await RequestAsync<EnterpriseDto>(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<EnterpriseDto> GetAsync(Guid id)
{
return await RequestAsync<EnterpriseDto>(nameof(GetAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id }
});
}
public virtual async Task<PagedResultDto<EnterpriseDto>> GetListAsync(EnterpriseGetListInput input)
{
return await RequestAsync<PagedResultDto<EnterpriseDto>>(nameof(GetListAsync), new ClientProxyRequestTypeValue
{
{ typeof(EnterpriseGetListInput), input }
});
}
public virtual async Task<EnterpriseDto> UpdateAsync(Guid id, EnterpriseUpdateDto input)
{
return await RequestAsync<EnterpriseDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
{
{ typeof(Guid), id },
{ typeof(EnterpriseUpdateDto), input }
});
}
}

7
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
{
}

621
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<LINGYUN.Platform.Datas.DataDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<LINGYUN.Platform.Datas.DataDto>"
}
}
]
}
],
"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<LINGYUN.Platform.Datas.DataDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<LINGYUN.Platform.Datas.DataDto>"
},
"allowAnonymous": null,
"implementFrom": "LINGYUN.Platform.Datas.IGlobalDataAppService"
}
}
},
"LINGYUN.Platform.Feedbacks.FeedbackAttachmentController": { "LINGYUN.Platform.Feedbacks.FeedbackAttachmentController": {
"controllerName": "FeedbackAttachment", "controllerName": "FeedbackAttachment",
"controllerGroupName": "FeedbackAttachment", "controllerGroupName": "FeedbackAttachment",
@ -3677,6 +3826,18 @@
"bindingSourceId": "ModelBinding", "bindingSourceId": "ModelBinding",
"descriptorName": "input" "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", "nameOnMethod": "input",
"name": "Priority", "name": "Priority",
@ -3689,6 +3850,30 @@
"bindingSourceId": "ModelBinding", "bindingSourceId": "ModelBinding",
"descriptorName": "input" "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", "nameOnMethod": "input",
"name": "Sorting", "name": "Sorting",
@ -4259,6 +4444,42 @@
"bindingSourceId": "ModelBinding", "bindingSourceId": "ModelBinding",
"descriptorName": "input" "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", "nameOnMethod": "input",
"name": "Sorting", "name": "Sorting",
@ -5173,6 +5394,406 @@
"implementFrom": "Volo.Abp.Application.Services.IUpdateAppService<LINGYUN.Platform.Packages.PackageDto,System.Guid,LINGYUN.Platform.Packages.PackageUpdateDto>" "implementFrom": "Volo.Abp.Application.Services.IUpdateAppService<LINGYUN.Platform.Packages.PackageDto,System.Guid,LINGYUN.Platform.Packages.PackageUpdateDto>"
} }
} }
},
"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<LINGYUN.Platform.Portal.EnterpriseDto>",
"typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto<LINGYUN.Platform.Portal.EnterpriseDto>"
}
},
{
"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<LINGYUN.Platform.Portal.EnterpriseDto,LINGYUN.Platform.Portal.EnterpriseCreateDto>"
},
"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<System.Guid>"
},
"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<LINGYUN.Platform.Portal.EnterpriseDto,LINGYUN.Platform.Portal.EnterpriseDto,System.Guid,LINGYUN.Platform.Portal.EnterpriseGetListInput>"
},
"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<LINGYUN.Platform.Portal.EnterpriseDto>",
"typeSimple": "Volo.Abp.Application.Dtos.PagedResultDto<LINGYUN.Platform.Portal.EnterpriseDto>"
},
"allowAnonymous": false,
"implementFrom": "Volo.Abp.Application.Services.IReadOnlyAppService<LINGYUN.Platform.Portal.EnterpriseDto,LINGYUN.Platform.Portal.EnterpriseDto,System.Guid,LINGYUN.Platform.Portal.EnterpriseGetListInput>"
},
"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<LINGYUN.Platform.Portal.EnterpriseDto,System.Guid,LINGYUN.Platform.Portal.EnterpriseUpdateDto>"
}
}
} }
} }
} }

43
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<DataDto> GetByNameAsync(string name)
{
return await DataAppService.GetByNameAsync(name);
}
[HttpGet]
[Route("{id}")]
public async virtual Task<DataDto> GetAsync(Guid id)
{
return await DataAppService.GetAsync(id);
}
[HttpGet]
[Route("all")]
public async virtual Task<ListResultDto<DataDto>> GetAllAsync()
{
return await DataAppService.GetAllAsync();
}
}
Loading…
Cancel
Save