Files
AI-Check-Test/.gitea/checker/notify-templates/field-description.md
dongzi 9141fdbb19
All checks were successful
类变更检测 / class-change-check (push) Successful in 13s
格式优化测试完成
2026-06-08 14:40:06 +08:00

48 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 字段说明规则
字段变更采用 **引用块 + 单行合并 + font 颜色**,遵循企微 `markdown` v1不支持列表
## 说明提取优先级
| 优先级 | 来源 |
|:------:|------|
| 1 | `@Schema(description = "...")` |
| 2 | `@ApiModelProperty` |
| 3 | `/** ... */` 字段注释 |
| 4 | 空串 |
## 字段变更行格式
每条变更占**一行**,标签、说明、类型横向排列,冒号后两空格:
```
> **共 <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="info">[新增]</font> `storeId` 说明: <font color="comment">门店ID</font>
```
| 操作 | 标签 | 类型段 |
|------|------|--------|
| 新增 | info `[新增]` | 无 |
| 删除 | warning `[删除]` | 无 |
| 修改 | warning `[修改]` | 仅类型变化时出现 |
- 统计行加粗,数字用 warning橙色文案为「共 N 项变更」(不含「字段」)
- 多条变更之间用**空行**分隔
- 说明为空时显示 `<font color="comment">(无说明)</font>`
- 头部四行加粗,用 `quoteKvBold`;不要在 `<font>` 内嵌 `**bold**`
## 接口行格式
```
> <font color="info">POST</font> `/apply/clockIn`
```
## 实现
- `ClassFieldParser.extractFieldLabel()`
- `FieldDiffEngine` — 仅类型变化产生 `[修改]`
- `WeComNotifier.formatFieldChange()`