Browse Source

feat(notifications): 重命名发送模板消息接口

pull/1166/head
colin 12 months ago
parent
commit
04a9e5215a
  1. 2
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/INotificationAppService.cs
  2. 2
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/NotificationAppService.cs
  3. 21
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/NotificationClientProxy.Generated.cs
  4. 62
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/notifications-generate-proxy.json
  5. 4
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/NotificationController.cs

2
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application.Contracts/LINGYUN/Abp/Notifications/INotificationAppService.cs

@ -13,5 +13,5 @@ public interface INotificationAppService
Task SendAsync(NotificationSendDto input);
Task SendAsync(NotificationTemplateSendDto input);
Task SendTemplateAsync(NotificationTemplateSendDto input);
}

2
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/NotificationAppService.cs

@ -127,7 +127,7 @@ public class NotificationAppService : AbpNotificationsApplicationServiceBase, IN
severity: input.Severity);
}
public async virtual Task SendAsync(NotificationTemplateSendDto input)
public async virtual Task SendTemplateAsync(NotificationTemplateSendDto input)
{
var notificationTemplate = new NotificationTemplate(
input.Name,

21
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/LINGYUN/Abp/Notifications/NotificationClientProxy.Generated.cs

@ -1,8 +1,14 @@
// This file is automatically generated by ABP framework to use MVC Controllers from CSharp
using LINGYUN.Abp.Notifications;
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.Abp.Notifications;
@ -19,6 +25,14 @@ public partial class NotificationClientProxy : ClientProxyBase<INotificationAppS
});
}
public virtual async Task SendTemplateAsync(NotificationTemplateSendDto input)
{
await RequestAsync(nameof(SendTemplateAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationTemplateSendDto), input }
});
}
public virtual async Task<ListResultDto<NotificationGroupDto>> GetAssignableNotifiersAsync()
{
return await RequestAsync<ListResultDto<NotificationGroupDto>>(nameof(GetAssignableNotifiersAsync));
@ -29,11 +43,8 @@ public partial class NotificationClientProxy : ClientProxyBase<INotificationAppS
return await RequestAsync<ListResultDto<NotificationTemplateDto>>(nameof(GetAssignableTemplatesAsync));
}
public virtual async Task SendAsync(NotificationTemplateSendDto input)
public virtual async Task<ListResultDto<NotificationProviderDto>> GetAssignableProvidersAsync()
{
await RequestAsync(nameof(SendAsync), new ClientProxyRequestTypeValue
{
{ typeof(NotificationTemplateSendDto), input }
});
return await RequestAsync<ListResultDto<NotificationProviderDto>>(nameof(GetAssignableProvidersAsync));
}
}

62
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi.Client/ClientProxies/notifications-generate-proxy.json

@ -1283,6 +1283,14 @@
"type": "LINGYUN.Abp.Notifications.INotificationAppService",
"name": "INotificationAppService",
"methods": [
{
"name": "GetAssignableProvidersAsync",
"parametersOnMethod": [],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<LINGYUN.Abp.Notifications.NotificationProviderDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<LINGYUN.Abp.Notifications.NotificationProviderDto>"
}
},
{
"name": "GetAssignableNotifiersAsync",
"parametersOnMethod": [],
@ -1317,7 +1325,7 @@
}
},
{
"name": "SendAsync",
"name": "SendTemplateAsync",
"parametersOnMethod": [
{
"name": "input",
@ -1374,6 +1382,43 @@
"allowAnonymous": false,
"implementFrom": "LINGYUN.Abp.Notifications.INotificationAppService"
},
"SendTemplateAsyncByInput": {
"uniqueName": "SendTemplateAsyncByInput",
"name": "SendTemplateAsync",
"httpMethod": "POST",
"url": "api/notifications/send/template",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "input",
"typeAsString": "LINGYUN.Abp.Notifications.NotificationTemplateSendDto, LINGYUN.Abp.Notifications.Application.Contracts",
"type": "LINGYUN.Abp.Notifications.NotificationTemplateSendDto",
"typeSimple": "LINGYUN.Abp.Notifications.NotificationTemplateSendDto",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "input",
"name": "input",
"jsonName": null,
"type": "LINGYUN.Abp.Notifications.NotificationTemplateSendDto",
"typeSimple": "LINGYUN.Abp.Notifications.NotificationTemplateSendDto",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "Body",
"descriptorName": ""
}
],
"returnValue": {
"type": "System.Void",
"typeSimple": "System.Void"
},
"allowAnonymous": false,
"implementFrom": "LINGYUN.Abp.Notifications.INotificationAppService"
},
"GetAssignableNotifiersAsync": {
"uniqueName": "GetAssignableNotifiersAsync",
"name": "GetAssignableNotifiersAsync",
@ -1403,6 +1448,21 @@
},
"allowAnonymous": false,
"implementFrom": "LINGYUN.Abp.Notifications.INotificationAppService"
},
"GetAssignableProvidersAsync": {
"uniqueName": "GetAssignableProvidersAsync",
"name": "GetAssignableProvidersAsync",
"httpMethod": "GET",
"url": "api/notifications/assignable-providers",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
"returnValue": {
"type": "Volo.Abp.Application.Dtos.ListResultDto<LINGYUN.Abp.Notifications.NotificationProviderDto>",
"typeSimple": "Volo.Abp.Application.Dtos.ListResultDto<LINGYUN.Abp.Notifications.NotificationProviderDto>"
},
"allowAnonymous": false,
"implementFrom": "LINGYUN.Abp.Notifications.INotificationAppService"
}
}
}

4
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.HttpApi/LINGYUN/Abp/Notifications/NotificationController.cs

@ -33,9 +33,9 @@ public class NotificationController : AbpControllerBase, INotificationAppService
[HttpPost]
[Route("send/template")]
public virtual Task SendAsync(NotificationTemplateSendDto input)
public virtual Task SendTemplateAsync(NotificationTemplateSendDto input)
{
return NotificationAppService.SendAsync(input);
return NotificationAppService.SendTemplateAsync(input);
}
[HttpGet]

Loading…
Cancel
Save