Kaynağa Gözat

修改会计科目的子节点名称

ljx 4 yıl önce
ebeveyn
işleme
5085b2ad9a

+ 1 - 1
src/main/java/com/imed/costaccount/model/vo/AccountVO.java

@@ -21,7 +21,7 @@ public class AccountVO {
 
     private Integer isBaseCost;
 
-    private List<AccountVO> child;
+    private List<AccountVO> children;
 
 
 }

+ 2 - 2
src/main/java/com/imed/costaccount/service/impl/AccountingServiceImpl.java

@@ -68,12 +68,12 @@ public class AccountingServiceImpl extends ServiceImpl<AccountingMapper, Account
         for (AccountVO account : list) {
             // 如果是父子关系
             if (accountVO.getId().equals(account.getParentId())) {
-                List<AccountVO> child = accountVO.getChild();
+                List<AccountVO> child = accountVO.getChildren();
                 if (CollUtil.isEmpty(child)) {
                     child = new ArrayList<>();
                 }
                 child.add(account);
-                accountVO.setChild(child);
+                accountVO.setChildren(child);
                 // 处理子节点
                 this.getAccountTree(account, list);
             }