diff --git a/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/README.EN.md b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/README.EN.md new file mode 100644 index 000000000..167570e70 --- /dev/null +++ b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/README.EN.md @@ -0,0 +1,80 @@ +# LINGYUN.Abp.PushPlus.SettingManagement + +PushPlus settings management module, providing management interface and API endpoints for PushPlus configuration. + +## Features + +* Provides PushPlus configuration management API +* Supports global configuration management +* Supports tenant configuration management +* Supports multilingual +* Integrates with ABP settings management module + +## Installation + +```bash +dotnet add package LINGYUN.Abp.PushPlus.SettingManagement +``` + +## Module Dependencies + +```csharp +[DependsOn(typeof(AbpPushPlusSettingManagementModule))] +public class YouProjectModule : AbpModule +{ + // other +} +``` + +## API Endpoints + +### Get Global Configuration + +```http +GET /api/setting-management/push-plus/by-global +``` + +Response example: +```json +{ + "name": "PushPlus", + "displayName": "PushPlus Configuration", + "settings": [ + { + "name": "PushPlus.Security.Token", + "value": "your-token", + "displayName": "Token", + "description": "Token obtained from PushPlus platform" + }, + { + "name": "PushPlus.Security.SecretKey", + "value": "your-secret", + "displayName": "Secret Key", + "description": "Secret key obtained from PushPlus platform" + } + ] +} +``` + +### Get Tenant Configuration + +```http +GET /api/setting-management/push-plus/by-current-tenant +``` + +Response format is the same as global configuration. + +## Permissions + +* Abp.PushPlus.ManageSetting - Permission to manage PushPlus configuration + +## Localization + +The module supports the following languages: +* Simplified Chinese +* English + +## More Information + +* [LINGYUN.Abp.PushPlus](../LINGYUN.Abp.PushPlus/README.md) +* [ABP Settings Management](https://docs.abp.io/en/abp/latest/Settings) diff --git a/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/README.md b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/README.md new file mode 100644 index 000000000..995415d14 --- /dev/null +++ b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus.SettingManagement/README.md @@ -0,0 +1,80 @@ +# LINGYUN.Abp.PushPlus.SettingManagement + +PushPlus 设置管理模块,提供 PushPlus 配置的管理界面和API接口。 + +## 功能特性 + +* 提供 PushPlus 配置管理接口 +* 支持全局配置管理 +* 支持租户配置管理 +* 支持多语言 +* 集成 ABP 设置管理模块 + +## 安装 + +```bash +dotnet add package LINGYUN.Abp.PushPlus.SettingManagement +``` + +## 模块引用 + +```csharp +[DependsOn(typeof(AbpPushPlusSettingManagementModule))] +public class YouProjectModule : AbpModule +{ + // other +} +``` + +## API接口 + +### 获取全局配置 + +```http +GET /api/setting-management/push-plus/by-global +``` + +响应示例: +```json +{ + "name": "PushPlus", + "displayName": "PushPlus配置", + "settings": [ + { + "name": "PushPlus.Security.Token", + "value": "your-token", + "displayName": "Token", + "description": "PushPlus平台获取的Token" + }, + { + "name": "PushPlus.Security.SecretKey", + "value": "your-secret", + "displayName": "密钥", + "description": "PushPlus平台获取的密钥" + } + ] +} +``` + +### 获取租户配置 + +```http +GET /api/setting-management/push-plus/by-current-tenant +``` + +响应格式同全局配置。 + +## 权限 + +* Abp.PushPlus.ManageSetting - 管理PushPlus配置的权限 + +## 本地化 + +模块支持以下语言: +* 中文简体 +* 英文 + +## 更多信息 + +* [LINGYUN.Abp.PushPlus](../LINGYUN.Abp.PushPlus/README.md) +* [ABP设置管理](https://docs.abp.io/en/abp/latest/Settings) diff --git a/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus/README.EN.md b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus/README.EN.md new file mode 100644 index 000000000..fb91dea8a --- /dev/null +++ b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus/README.EN.md @@ -0,0 +1,122 @@ +# LINGYUN.Abp.PushPlus + +Integration with PushPlus + +Implements PushPlus related API documentation, providing PushPlus open capabilities. + +For details, see PushPlus documentation: https://www.pushplus.plus/doc/guide/openApi.html + +## Module Dependencies + +```csharp +[DependsOn(typeof(AbpPushPlusModule))] +public class YouProjectModule : AbpModule +{ + // other +} +``` + +## Features + +* PushPlus PushPlus feature group +* PushPlus.Message.Enable Enable PushPlus message channel globally +* PushPlus.Channel.WeChat WeChat public account message channel +* PushPlus.Channel.WeChat.Enable Enable WeChat public account message channel +* PushPlus.Channel.WeChat.SendLimit WeChat public account message channel send limit +* PushPlus.Channel.WeChat.SendLimitInterval WeChat public account message channel limit period (days) +* PushPlus.Channel.WeWork WeWork message channel +* PushPlus.Channel.WeWork.Enable Enable WeWork message channel +* PushPlus.Channel.WeWork.SendLimit WeWork message channel send limit +* PushPlus.Channel.WeWork.SendLimitInterval WeWork message channel limit period (days) +* PushPlus.Channel.Webhook Webhook message channel +* PushPlus.Channel.Webhook.Enable Enable Webhook message channel +* PushPlus.Channel.Webhook.SendLimit Webhook message channel send limit +* PushPlus.Channel.Webhook.SendLimitInterval Webhook message channel limit period (days) +* PushPlus.Channel.Email Email message channel +* PushPlus.Channel.Email.Enable Enable Email message channel +* PushPlus.Channel.Email.SendLimit Email message channel send limit +* PushPlus.Channel.Email.SendLimitInterval Email message channel limit period (days) +* PushPlus.Channel.Sms SMS message channel +* PushPlus.Channel.Sms.Enable Enable SMS message channel +* PushPlus.Channel.Sms.SendLimit SMS message channel send limit +* PushPlus.Channel.Sms.SendLimitInterval SMS message channel limit period (days) + +## Configuration + +```json +{ + "PushPlus": { + "Security": { + "Token": "your-pushplus-token", // Token obtained from PushPlus platform + "SecretKey": "your-pushplus-secret" // Secret key obtained from PushPlus platform + } + } +} +``` + +## Basic Usage + +1. Configure PushPlus Credentials + * Get Token and Secret key from PushPlus platform + * Set Token and Secret key in configuration file + +2. Send Messages + ```csharp + public class YourService + { + private readonly IPushPlusMessageSender _messageSender; + + public YourService(IPushPlusMessageSender messageSender) + { + _messageSender = messageSender; + } + + public async Task SendMessageAsync() + { + // Send WeChat message + await _messageSender.SendWeChatAsync( + title: "Message Title", + content: "Message Content", + topic: "Optional Topic", + template: PushPlusMessageTemplate.Html + ); + + // Send WeWork message + await _messageSender.SendWeWorkAsync( + title: "Message Title", + content: "Message Content" + ); + + // Send Email + await _messageSender.SendEmailAsync( + title: "Email Title", + content: "Email Content" + ); + + // Send SMS + await _messageSender.SendSmsAsync( + title: "SMS Title", + content: "SMS Content" + ); + + // Send Webhook message + await _messageSender.SendWebhookAsync( + title: "Message Title", + content: "Message Content", + webhook: "webhook-url" + ); + } + } + ``` + +## Message Templates + +* Html - HTML format (default) +* Text - Plain text format +* Json - JSON format +* Markdown - Markdown format + +## More Information + +* [PushPlus Documentation](https://www.pushplus.plus/doc/guide/openApi.html) +* [ABP Framework](https://abp.io/) diff --git a/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus/README.md b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus/README.md index fa982ac69..4535ee922 100644 --- a/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus/README.md +++ b/aspnet-core/framework/pushplus/LINGYUN.Abp.PushPlus/README.md @@ -40,3 +40,83 @@ public class YouProjectModule : AbpModule * PushPlus.Channel.Sms.Enable 启用短信消息通道 * PushPlus.Channel.Sms.SendLimit 短信消息通道限制次数 * PushPlus.Channel.Sms.SendLimitInterval 短信消息通道限制周期(天) + +## 配置项 + +```json +{ + "PushPlus": { + "Security": { + "Token": "你的PushPlus Token", // PushPlus平台获取的Token + "SecretKey": "你的PushPlus密钥" // PushPlus平台获取的密钥 + } + } +} +``` + +## 基本用法 + +1. 配置 PushPlus 凭证 + * 在PushPlus平台获取Token和密钥 + * 在配置文件中设置Token和密钥 + +2. 发送消息 + ```csharp + public class YourService + { + private readonly IPushPlusMessageSender _messageSender; + + public YourService(IPushPlusMessageSender messageSender) + { + _messageSender = messageSender; + } + + public async Task SendMessageAsync() + { + // 发送微信消息 + await _messageSender.SendWeChatAsync( + title: "消息标题", + content: "消息内容", + topic: "可选的主题", + template: PushPlusMessageTemplate.Html + ); + + // 发送企业微信消息 + await _messageSender.SendWeWorkAsync( + title: "消息标题", + content: "消息内容" + ); + + // 发送邮件 + await _messageSender.SendEmailAsync( + title: "邮件标题", + content: "邮件内容" + ); + + // 发送短信 + await _messageSender.SendSmsAsync( + title: "短信标题", + content: "短信内容" + ); + + // 发送Webhook消息 + await _messageSender.SendWebhookAsync( + title: "消息标题", + content: "消息内容", + webhook: "webhook地址" + ); + } + } + ``` + +## 消息模板 + +* Html - HTML格式(默认) +* Text - 纯文本格式 +* Json - JSON格式 +* Markdown - Markdown格式 + +## 更多信息 + +* [PushPlus官方文档](https://www.pushplus.plus/doc/guide/openApi.html) +* [ABP框架](https://abp.io/)