This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
共 **1** 个类对象 · **2** 项字段变更
|
||||
|
||||
**applyAttendanceChangeDto** · `ApplyAttendanceChangeDto`
|
||||
**`ApplyAttendanceChangeDto`**
|
||||
|
||||
├─ `taskIds` · `List<String>` · 必填 [新增]
|
||||
> 说明:流程主键集合
|
||||
|
||||
@@ -149,7 +149,7 @@ public class ApiChangeNotifier {
|
||||
}
|
||||
}
|
||||
if (!bodyChanges.isEmpty()) {
|
||||
sb.append("**类对象变更(含嵌套字段)**").append("\n\n");
|
||||
sb.append("**类对象变更(含嵌套对象字段)**").append("\n\n");
|
||||
appendBodyGroups(sb, bodyChanges);
|
||||
sb.append("\n");
|
||||
}
|
||||
@@ -170,8 +170,9 @@ public class ApiChangeNotifier {
|
||||
private void appendBodyGroups(StringBuilder sb, List<ParameterChange> bodyChanges) {
|
||||
Map<String, List<ParameterChange>> groups = new LinkedHashMap<>();
|
||||
for (ParameterChange change : bodyChanges) {
|
||||
String key = (change.getBodyParamName() == null ? "body" : change.getBodyParamName())
|
||||
+ "|" + (change.getParentDto() == null ? "" : change.getParentDto());
|
||||
String key = change.getParentDto() == null || change.getParentDto().isBlank()
|
||||
? (change.getBodyParamName() == null ? "body" : change.getBodyParamName())
|
||||
: change.getParentDto();
|
||||
groups.computeIfAbsent(key, k -> new ArrayList<>()).add(change);
|
||||
}
|
||||
int total = bodyChanges.size();
|
||||
@@ -182,9 +183,10 @@ public class ApiChangeNotifier {
|
||||
+ " 项变更**")).append("\n\n");
|
||||
for (List<ParameterChange> group : groups.values()) {
|
||||
ParameterChange first = group.get(0);
|
||||
sb.append("**").append(first.getBodyParamName()).append("**");
|
||||
if (first.getParentDto() != null && !first.getParentDto().isBlank()) {
|
||||
sb.append(" ").append(MarkdownStyles.inlineCode(first.getParentDto()));
|
||||
sb.append("**").append(MarkdownStyles.inlineCode(first.getParentDto())).append("**");
|
||||
} else if (first.getBodyParamName() != null && !first.getBodyParamName().isBlank()) {
|
||||
sb.append("**").append(MarkdownStyles.inlineCode(first.getBodyParamName())).append("**");
|
||||
}
|
||||
sb.append("\n\n");
|
||||
for (ParameterChange change : group) {
|
||||
|
||||
@@ -76,7 +76,8 @@ public class NestedDtoFieldParser {
|
||||
continue;
|
||||
}
|
||||
expanded = true;
|
||||
collectFields(nestedType, path, visiting, out, sha, depth + 1);
|
||||
// 嵌套字段路径用类型简单类名(如 UserSelfDto.nickName),不用成员名(userDtos.nickName)
|
||||
collectFields(nestedType, nestedType, visiting, out, sha, depth + 1);
|
||||
}
|
||||
if (!expanded) {
|
||||
out.add(new NestedFieldInfo(path, field.getType(), field.getDescription()));
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user