Browse Source

refactor: update child property access method in ${ClassName}ServiceImpl for enhanced clarity

PIG AI 1 week ago
parent
commit
f3b0da751d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tree/树形ServiceImpl.java

+ 1 - 1
tree/树形ServiceImpl.java

@@ -152,7 +152,7 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
         List<${ClassName}Entity> children = list(wrapper);
         
         for (${ClassName}Entity child : children) {
-            ${pk.attrType} childId = child.get${str.capitalizeFirst($pk.attrName)}();
+            ${pk.attrType} childId = child.$str.getProperty($pk.attrName)();
             childIds.add(childId);
             // 递归获取子节点的子节点
             childIds.addAll(getChildIdsRecursive(childId));