# mh-tools-message-adapter
**Repository Path**: person_my2/mh-tools-message-adapter
## Basic Information
- **Project Name**: mh-tools-message-adapter
- **Description**: 项目使用mybatis-plus、sringboot、mysql搭建消息发送平台(此消息非彼消息)。通过此项目可以发送钉钉群机器人、企业微信、手机短信、邮件通知等多功能消息,内置拦截重复发送消息、过滤关键字等个性化功能
- **Primary Language**: Java
- **License**: MulanPSL-1.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 3
- **Created**: 2021-05-07
- **Last Updated**: 2021-06-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Pigeon(信鸽消息传递系统)
## 1. 系统背景
在系统试运行环境中,代码中抛出NPE等异常,此时代码开发者是无感知
为了避免此类情况,使用ELK采集错误日志,然后使用 `Pigeon`进行消息传递
预计支持`钉钉机器人、微信付服务号、企业微信、邮件通知、手机短信`等消息通知,目前仅支持`钉钉机器人`发送通知
## 2. 模块划分
| 包名 | 说明 | 负责人 |
| ------ | ---------------------------- | ------ |
| common | 公共组件 | 马称 |
| mail | 邮箱邮件发送 | |
| ding | 钉钉机器人消息发送 | 马称 |
| wechat | 微信服务号、企业微信消息发送 | |
| mobile | 手机短信消息发送 | |
## 2.1 接口文档
### 2.1.1 基本信息
**Path:** /message/send
**Method:** POST
**接口描述:发送通知消息**
**Body**
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
| atMobiles | string | 非必须 | | @联系人列表 支持多个以,分割 | |
| content | string | 必须 | | 内容 | |
| sendType | string | 必须 | | 发送类型(dingtalk or email or dingtalk,email) | |
| title | string | 必须 | | 标题 | |
| token | string | 非必须 | | 密钥 支持多个以,分割 | |
#### 2.1.1.1 示例数据
```json
{
"sendType": "dingtalk",
"token": "56417ebba6a27ca352f0de77a2ae9da66d01f39610b5ee8a6033c60ef9071c55",
"title": "监控报警",
"atMobiles": "15601166691",
"content": "#### 【报警】代码发送过程VPN中断 \n\n 发送人员:百万 \n\n 详细地址:[详情请点击](https://www.baidu.com) \n\n 发送时间:2020-04-26 15:58:59 \n\n 错误信息:提交代码连接VPN被中断,详细错误信息麻烦登录服务器查看 \n\n 修复人员:@15601166691"
}
```
#### 2.1.1.2 效果如下

### 2.1.2 返回数据
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
| code | string | 非必须 | | | |
| detail | string | 非必须 | | | |
| fail | boolean | 非必须 | | | |
| message | string | 非必须 | | | |
| success | boolean | 非必须 | | | |