feat: 1、将 - saas:period-config:migration:current 修改为 - Key --> saas:period-config:migration:current
All checks were successful
缓存序列化结构检查 / cache-schema-check (push) Has been skipped
All checks were successful
缓存序列化结构检查 / cache-schema-check (push) Has been skipped
2、将 - saas:period-config:migration:current 加粗
3、将旧骨架标注为绿色
4、将新骨架标注为warn颜色
This commit is contained in:
@@ -40,7 +40,7 @@ public class ReportBuilder {
|
||||
sb.append("未检测到缓存序列化结构变更。\n");
|
||||
} else {
|
||||
for (SchemaChange c : report.getChanges()) {
|
||||
sb.append("- `").append(nvl(c.getKeyPattern())).append("`\n");
|
||||
appendKeyLine(sb, c.getKeyPattern());
|
||||
if (c.getMessage() != null) {
|
||||
sb.append(" ").append(c.getMessage()).append('\n');
|
||||
}
|
||||
@@ -50,21 +50,39 @@ public class ReportBuilder {
|
||||
}
|
||||
|
||||
for (KeyStructureChange kc : keys) {
|
||||
sb.append("- `").append(nvl(kc.getKeyPattern())).append("`\n");
|
||||
appendKeyLine(sb, kc.getKeyPattern());
|
||||
String oldJson = nvl(kc.getOldSkeletonJson());
|
||||
String newJson = nvl(kc.getNewSkeletonJson());
|
||||
if (oldJson.isEmpty() && !newJson.isEmpty()) {
|
||||
sb.append(" value 新增为 “").append(newJson).append("”\n\n");
|
||||
sb.append(" value 新增为 “").append(fontWarning(newJson)).append("”\n\n");
|
||||
} else if (!oldJson.isEmpty() && newJson.isEmpty()) {
|
||||
sb.append(" value 原结构 “").append(oldJson).append("” 已删除写入\n\n");
|
||||
sb.append(" value 原结构 “").append(fontInfo(oldJson)).append("” 已删除写入\n\n");
|
||||
} else {
|
||||
sb.append(" value 值从 “").append(oldJson).append("”\n");
|
||||
sb.append(" 变更为 “").append(newJson).append("”\n\n");
|
||||
sb.append(" value 值从 “").append(fontInfo(oldJson)).append("”\n");
|
||||
sb.append(" 变更为 “").append(fontWarning(newJson)).append("”\n\n");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Key 行:加粗「Key -->」+ 加粗 key 文本。
|
||||
* 避免 key 末尾 * 与 markdown ** 冲突,结尾加零宽空格再闭合。
|
||||
*/
|
||||
private void appendKeyLine(StringBuilder sb, String keyPattern) {
|
||||
sb.append("- **Key --> ").append(nvl(keyPattern)).append("\u200b**\n");
|
||||
}
|
||||
|
||||
/** 企微 markdown:绿色(旧骨架)。 */
|
||||
private String fontInfo(String text) {
|
||||
return "<font color=\"info\">" + text + "</font>";
|
||||
}
|
||||
|
||||
/** 企微 markdown:warning 橙红(新骨架)。 */
|
||||
private String fontWarning(String text) {
|
||||
return "<font color=\"warning\">" + text + "</font>";
|
||||
}
|
||||
|
||||
/**
|
||||
* CI 控制台:字段明细 + 完整企微 Markdown。
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user