Browse Source

refactor: correct parent ID property access method in ${ClassName}ServiceImpl for improved clarity

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

+ 1 - 1
tree/树形ServiceImpl.java

@@ -67,7 +67,7 @@ public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${C
             TreeNode<${pk.attrType}> node = new TreeNode<>();
             node.setId(entity.$str.getProperty($pk.attrName)());
             node.setName(entity.$str.getProperty($nameField)());
-            node.setParentId($parentField)(entity.$str.getProperty($parentField)() != null ? entity.$str.getProperty($parentField)() : 0L);
+            node.setParentId(entity.$str.getProperty($parentField)() != null ? entity.$str.getProperty($parentField)() : 0L);
 
             // 扩展属性
             Map<String, Object> extra = new HashMap<>();