jar包瘦身
This commit is contained in:
58
target/classes/notify-templates/README.md
Normal file
58
target/classes/notify-templates/README.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# 类变更通知模版
|
||||
|
||||
Push 触发 CI 后,按变更类的后缀(`Dto` / `Vo` / `Entity` / `Model`)选用对应模版生成企业微信 Markdown 通知。
|
||||
|
||||
## 企微语法说明
|
||||
|
||||
使用 webhook **`markdown`**(v1),支持 font 三色;**不支持无序列表**,故各项以**引用块 + 换行**分行展示。
|
||||
|
||||
| 语法 | 说明 |
|
||||
|------|------|
|
||||
| `#` / `##` / `###` | 标题(主区块用【】) |
|
||||
| `` `行内代码` `` | 字段名、URI |
|
||||
| `>` | 引用行(每项一行) |
|
||||
| `**bold**` | 头部四行、统计行加粗 |
|
||||
| `<font color="info">` | 绿:类名、新增、HTTP 方法、新类型 |
|
||||
| `<font color="comment">` | 灰:说明、路径、无影响 |
|
||||
| `<font color="warning">` | 橙:[修改]/[删除]、旧类型、统计数字 |
|
||||
|
||||
## 布局约定
|
||||
|
||||
1. **# 【类变更通知】** — 头部 4 项,每项一行 `>**标签: 值**`(加粗,冒号后两空格);变更对象括号内展示类中文说明(@Schema / Javadoc),无说明则仅类名
|
||||
2. **## 【对象变更细节】** — 统计行 + 每条变更单行(标签/说明/类型合并)
|
||||
3. **## 【影响范围】** — 各 ### 小节内,每项一行引用
|
||||
|
||||
## 公共头部
|
||||
|
||||
```
|
||||
# 【类变更通知】
|
||||
|
||||
> **变更对象: <font color="info">ApplyAttendanceChangeDto</font>(<font color="comment">流程表单 [出勤变更]</font>)**
|
||||
> **修改人: <font color="comment">dongzi</font>**
|
||||
> **时间: <font color="comment">2026-06-07 20:14:35</font>**
|
||||
> **路径: <font color="comment">jnpf-ftb/.../ApplyAttendanceChangeDto.java</font>**
|
||||
```
|
||||
|
||||
## 影响范围
|
||||
|
||||
| 类类型 | request | response | 类转换 |
|
||||
|--------|:-------:|:--------:|:------:|
|
||||
| Dto | ✅ | ✅ | ✅ |
|
||||
| Vo | ✅ | ✅ | ✅ |
|
||||
| Entity / Model | ❌ | ❌ | ✅ |
|
||||
|
||||
Dto/Vo 均固定展示 request、response 两栏;无匹配接口时显示「无」。类转换栏仅在 `dto_entity_conversion.enabled: true` 时展示,关闭时不出现该小节。实际影响由接口索引 + 嵌套关系传播,不假定 Dto 仅 request、Vo 仅 response。
|
||||
|
||||
## 模版文件
|
||||
|
||||
| 文件 | 场景 |
|
||||
|------|------|
|
||||
| [field-description.md](field-description.md) | 字段说明与行格式 |
|
||||
| [dto.md](dto.md) | Dto |
|
||||
| [vo.md](vo.md) | Vo |
|
||||
| [entity.md](entity.md) | Entity |
|
||||
| [model.md](model.md) | Model |
|
||||
|
||||
## 实现
|
||||
|
||||
`WeComNotifier.buildMarkdown()` · 消息类型 `markdown` · 路径取自 `ClassChangeReport.sourceFile`
|
||||
106
target/classes/notify-templates/dto.md
Normal file
106
target/classes/notify-templates/dto.md
Normal file
@@ -0,0 +1,106 @@
|
||||
# Dto 类变更通知模版
|
||||
|
||||
**识别规则**:类名以 `Dto` 结尾。
|
||||
**影响范围**:request + response + 类转换(无匹配时对应栏显示「无」)。
|
||||
**嵌套标识**:被其他 Dto/Vo 嵌套时在「变更对象」行追加 `(嵌套对象)`;若同时直接作接口入参/返回值根类型,再追加 `(顶层对象)`。纯顶层不标注。
|
||||
|
||||
---
|
||||
|
||||
## 完整示例(字段修改)
|
||||
|
||||
```
|
||||
# 【类变更通知】
|
||||
|
||||
> **变更对象: <font color="info">ApplyAttendanceChangeDto</font>(<font color="comment">流程表单 [出勤变更]</font>)**
|
||||
> **修改人: <font color="comment">dongzi</font>**
|
||||
> **时间: <font color="comment">2026-06-07 20:14:35</font>**
|
||||
> **路径: <font color="comment">jnpf-ftb/jnpf-ftb-entity/src/main/java/jnpf/model/workflow/dto/ApplyAttendanceChangeDto.java</font>**
|
||||
|
||||
## 【对象变更细节】
|
||||
|
||||
> **共 <font color="warning">4</font> 项变更**
|
||||
|
||||
> <font color="warning">[修改]</font> `taskId` 说明: <font color="comment">流程主键</font> 类型: <font color="warning">Integer</font> → <font color="info">String</font>
|
||||
|
||||
> <font color="warning">[修改]</font> `changeUserId` 说明: <font color="comment">变更人员id</font> 类型: <font color="warning">String</font> → <font color="info">Integer</font>
|
||||
|
||||
> <font color="info">[新增]</font> `storeId` 说明: <font color="comment">门店ID</font> 类型: <font color="info">String</font>
|
||||
|
||||
> <font color="warning">[删除]</font> `oldField` 说明: <font color="comment">已废弃字段</font> 类型: <font color="warning">Integer</font>
|
||||
|
||||
## 【影响范围】
|
||||
|
||||
### 影响 request 接口
|
||||
> <font color="info">POST</font> `/apply/clockIn`
|
||||
> <font color="info">PUT</font> `/apply/clockIn/{id}`
|
||||
|
||||
### 类转换影响
|
||||
> <font color="comment">未开启检测</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(嵌套对象)
|
||||
|
||||
```
|
||||
> **变更对象: <font color="info">UserSelfDto</font>(<font color="comment">嵌套对象</font>)**
|
||||
```
|
||||
|
||||
若该类同时直接出现在某接口 `@RequestBody` 或返回值类型中:
|
||||
|
||||
```
|
||||
> **变更对象: <font color="info">SomeDto</font>(<font color="comment">说明</font>)(<font color="comment">嵌套对象</font>)(<font color="comment">顶层对象</font>)**
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(类删除)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[已删除]</font> <font color="comment">该类文件已被移除</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(仅类名变更)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[类名变更]</font> <font color="comment">ApplyAttendanceChangeDto</font> → <font color="info">ApplyAttendanceChangeNewDto</font>
|
||||
> <font color="comment">字段无变化</font>
|
||||
|
||||
## 【影响范围】
|
||||
|
||||
### 影响 request 接口
|
||||
> <font color="info">POST</font> `/apply/clockIn`
|
||||
> <font color="info">PUT</font> `/apply/clockIn/{id}`
|
||||
|
||||
### 类转换影响
|
||||
> <font color="comment">未开启检测</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(类名 + 字段同时变更)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[类名变更]</font> <font color="comment">ApplyAttendanceChangeDto</font> → <font color="info">ApplyAttendanceChangeNewDto</font>
|
||||
|
||||
> **共 <font color="warning">1</font> 项变更**
|
||||
|
||||
> <font color="warning">[修改]</font> `changeMinute` 说明: <font color="comment">变更分钟数</font> 类型: <font color="warning">Integer</font> → <font color="info">String</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 占位符
|
||||
|
||||
| 占位符 | 来源 |
|
||||
|--------|------|
|
||||
| 路径 | Git 相对路径,`ClassChangeReport.sourceFile` |
|
||||
| 说明 | `@Schema` / 注释 |
|
||||
49
target/classes/notify-templates/entity.md
Normal file
49
target/classes/notify-templates/entity.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Entity 类变更通知模版
|
||||
|
||||
**识别规则**:类名以 `Entity` 结尾。
|
||||
**影响范围**:仅类转换(不展示 request/response 接口)。
|
||||
|
||||
---
|
||||
|
||||
## 完整示例(字段修改)
|
||||
|
||||
```
|
||||
# 【类变更通知】
|
||||
|
||||
> **变更对象: <font color="info">TrainingPositionEntity</font>(<font color="comment">培训岗位</font>)**
|
||||
> **修改人: <font color="comment">张三</font>**
|
||||
> **时间: <font color="comment">2026-06-07 14:30:00</font>**
|
||||
> **路径: <font color="comment">jnpf-ftb/jnpf-ftb-entity/src/main/java/jnpf/entity/training/TrainingPositionEntity.java</font>**
|
||||
|
||||
## 【对象变更细节】
|
||||
|
||||
> **共 <font color="warning">1</font> 项变更**
|
||||
|
||||
> <font color="warning">[修改]</font> `createTime` 说明: <font color="comment">创建时间</font> 类型: <font color="warning">Date</font> → <font color="info">LocalDateTime</font>
|
||||
|
||||
## 【影响范围】
|
||||
|
||||
### 类转换影响
|
||||
> Entity: <font color="info">TrainingPositionEntity</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(类删除)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[已删除]</font> <font color="comment">该类文件已被移除</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(仅类名变更)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[类名变更]</font> <font color="comment">TrainingPositionEntity</font> → <font color="info">TrainingPositionNewEntity</font>
|
||||
> <font color="comment">字段无变化</font>
|
||||
```
|
||||
57
target/classes/notify-templates/field-description.md
Normal file
57
target/classes/notify-templates/field-description.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# 字段说明规则
|
||||
|
||||
字段变更采用 **引用块 + 单行合并 + font 颜色**,遵循企微 `markdown` v1(不支持列表)。
|
||||
|
||||
## 说明提取优先级
|
||||
|
||||
| 优先级 | 来源 |
|
||||
|:------:|------|
|
||||
| 1 | `@Schema(description = "...")` |
|
||||
| 2 | `@ApiModelProperty` |
|
||||
| 3 | `/** ... */` 字段注释 |
|
||||
| 4 | 空串 |
|
||||
|
||||
## 字段变更行格式
|
||||
|
||||
每条变更占**一行**,标签、说明、类型横向排列,冒号后两空格:
|
||||
|
||||
```
|
||||
> **共 <font color="warning">2</font> 项变更**
|
||||
|
||||
> <font color="warning">[重命名]</font> <font color="comment">taskId</font> → <font color="info">taskIds</font> 说明: <font color="comment">流程主键</font>
|
||||
|
||||
> <font color="info">[新增]</font> `applyUserList` 说明: <font color="comment">申请人员集合</font> 类型: <font color="info">List<String></font>
|
||||
|
||||
> <font color="warning">[删除]</font> `applyUser1` 说明: <font color="comment">申请人员</font> 类型: <font color="warning">Integer</font>
|
||||
```
|
||||
|
||||
| 操作 | 标签 | 类型段 |
|
||||
|------|------|--------|
|
||||
| 新增 | info `[新增]` | 始终展示,绿色 `info` |
|
||||
| 删除 | warning `[删除]` | 始终展示,橙色 `warning` |
|
||||
| 修改 | warning `[修改]` | 始终展示,旧类型 warning → 新类型 info |
|
||||
| 重命名 | warning `[重命名]` | 始终展示;仅改名时单色 info,改类型时 old → new |
|
||||
|
||||
### 重命名配对规则
|
||||
|
||||
- 删除+新增且**类型相同、说明相同**(非空)→ `[重命名]`
|
||||
- 删除+新增且**说明相同但类型不同** → `[重命名]` + 类型行
|
||||
- 说明均为空时也可配对
|
||||
- 说明不同则不配对,保持删除+新增
|
||||
|
||||
- 统计行加粗,数字用 warning(橙色),文案为「共 N 项变更」(不含「字段」)
|
||||
- 多条变更之间用**空行**分隔
|
||||
- 说明为空时显示 `<font color="comment">(无说明)</font>`
|
||||
- 头部四行加粗,用 `quoteKvBold`;不要在 `<font>` 内嵌 `**bold**`
|
||||
|
||||
## 接口行格式
|
||||
|
||||
```
|
||||
> <font color="info">POST</font> `/apply/clockIn`
|
||||
```
|
||||
|
||||
## 实现
|
||||
|
||||
- `ClassFieldParser.extractFieldLabel()`
|
||||
- `FieldDiffEngine` — 类型变化产生 `[修改]`,说明匹配的删除+新增合并为 `[重命名]`
|
||||
- `WeComNotifier.formatFieldChange()`
|
||||
49
target/classes/notify-templates/model.md
Normal file
49
target/classes/notify-templates/model.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Model 类变更通知模版
|
||||
|
||||
**识别规则**:类名以 `Model` 结尾。
|
||||
**影响范围**:仅类转换(不展示 request/response 接口)。
|
||||
|
||||
---
|
||||
|
||||
## 完整示例(字段修改)
|
||||
|
||||
```
|
||||
# 【类变更通知】
|
||||
|
||||
> **变更对象: <font color="info">AttendanceRuleModel</font>(<font color="comment">考勤规则</font>)**
|
||||
> **修改人: <font color="comment">张三</font>**
|
||||
> **时间: <font color="comment">2026-06-07 14:30:00</font>**
|
||||
> **路径: <font color="comment">jnpf-ftb/jnpf-ftb-entity/src/main/java/jnpf/model/attendance/AttendanceRuleModel.java</font>**
|
||||
|
||||
## 【对象变更细节】
|
||||
|
||||
> **共 <font color="warning">1</font> 项变更**
|
||||
|
||||
> <font color="warning">[修改]</font> `ruleType` 说明: <font color="comment">规则类型</font> 类型: <font color="warning">Date</font> → <font color="info">String</font>
|
||||
|
||||
## 【影响范围】
|
||||
|
||||
### 类转换影响
|
||||
> Entity: <font color="info">AttendanceRuleEntity</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(类删除)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[已删除]</font> <font color="comment">该类文件已被移除</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(仅类名变更)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[类名变更]</font> <font color="comment">AttendanceRuleModel</font> → <font color="info">AttendanceRuleNewModel</font>
|
||||
> <font color="comment">字段无变化</font>
|
||||
```
|
||||
63
target/classes/notify-templates/vo.md
Normal file
63
target/classes/notify-templates/vo.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# Vo 类变更通知模版
|
||||
|
||||
**识别规则**:类名以 `Vo` 或 `VO` 结尾。
|
||||
**影响范围**:request + response + 类转换(无匹配时对应栏显示「无」)。
|
||||
**嵌套标识**:规则同 Dto——仅嵌套时标注 `(嵌套对象)`,嵌套且直接作接口根类型时追加 `(顶层对象)`。
|
||||
|
||||
---
|
||||
|
||||
## 完整示例(字段修改)
|
||||
|
||||
```
|
||||
# 【类变更通知】
|
||||
|
||||
> **变更对象: <font color="info">AttendanceDetailVo</font>(<font color="comment">考勤详情</font>)**
|
||||
> **修改人: <font color="comment">张三</font>**
|
||||
> **时间: <font color="comment">2026-06-07 14:30:00</font>**
|
||||
> **路径: <font color="comment">jnpf-ftb/jnpf-ftb-entity/src/main/java/jnpf/model/attendance/vo/AttendanceDetailVo.java</font>**
|
||||
|
||||
## 【对象变更细节】
|
||||
|
||||
> **共 <font color="warning">2</font> 项变更**
|
||||
|
||||
> <font color="info">[新增]</font> `overtimeHours` 说明: <font color="comment">加班时长</font>
|
||||
|
||||
> <font color="warning">[修改]</font> `status` 说明: <font color="comment">考勤状态</font> 类型: <font color="warning">Integer</font> → <font color="info">String</font>
|
||||
|
||||
## 【影响范围】
|
||||
|
||||
### 影响 response 接口
|
||||
> <font color="info">GET</font> `/api/attendance/detail`
|
||||
|
||||
### 类转换影响
|
||||
> Entity: <font color="info">AttendanceDetailEntity</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(类删除)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[已删除]</font> <font color="comment">该类文件已被移除</font>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 示例(仅类名变更)
|
||||
|
||||
```
|
||||
## 【对象变更细节】
|
||||
|
||||
> <font color="warning">[类名变更]</font> <font color="comment">AttendanceDetailVo</font> → <font color="info">AttendanceDetailNewVo</font>
|
||||
> <font color="comment">字段无变化</font>
|
||||
|
||||
## 【影响范围】
|
||||
|
||||
### 影响 response 接口
|
||||
> <font color="info">GET</font> `/api/attendance/detail`
|
||||
|
||||
### 类转换影响
|
||||
> <font color="comment">未开启检测</font>
|
||||
```
|
||||
Reference in New Issue
Block a user