From 00d1714ca8dcd6ce0e5fae6ad13982599546fae0 Mon Sep 17 00:00:00 2001 From: wxyclub Date: Tue, 24 Oct 2023 11:08:02 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E6=94=BF=E7=AD=96=E8=B5=84?= =?UTF-8?q?=E6=96=99=E4=B8=AD=E5=BF=83=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SarLawsInformationServiceImpl.java | 2 +- .../entity/SarLawsInformationCenterTree.java | 5 ++--- .../entity/SarLawsInformationCenterTreeData.java | 2 +- .../impl/SarLawsInformationCenterTreeServiceImpl.java | 6 +++--- .../SarLawsInformationCenterTreeMapper.xml | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java index 88357226..a1fadf83 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformation/service/impl/SarLawsInformationServiceImpl.java @@ -76,7 +76,7 @@ public class SarLawsInformationServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); - wrapper.isNull(SarLawsInformationCenterTree::getPId); + wrapper.isNull(SarLawsInformationCenterTree::getParentId); SarLawsInformationCenterTree one = treeService.getOne(wrapper); sarLawsInformation.setTreeNodeId(one.getId()); } diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTree.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTree.java index e630d31b..b497ee64 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTree.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTree.java @@ -25,9 +25,8 @@ public class SarLawsInformationCenterTree implements Serializable { /** * 父ID */ - @JsonProperty("pId") - @TableField(value = "p_id") - private String pId; + @TableField(value = "parent_id") + private String parentId; /** * 节点名称 diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTreeData.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTreeData.java index 2e417403..b8f144cf 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTreeData.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/entity/SarLawsInformationCenterTreeData.java @@ -19,7 +19,7 @@ public class SarLawsInformationCenterTreeData implements Serializable { /** * 父ID */ - private String pId; + private String parentId; /** * 节点名称 diff --git a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/service/impl/SarLawsInformationCenterTreeServiceImpl.java b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/service/impl/SarLawsInformationCenterTreeServiceImpl.java index 2a63a530..016db49c 100644 --- a/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/service/impl/SarLawsInformationCenterTreeServiceImpl.java +++ b/adc-da-slrs/src/main/java/com/adc/da/slrs/sarLawsInformationCenterTree/service/impl/SarLawsInformationCenterTreeServiceImpl.java @@ -76,7 +76,7 @@ public class SarLawsInformationCenterTreeServiceImpl extends ServiceImpl treeData = new ArrayList<>(); //代码遍历生成树 for (SarLawsInformationCenterTree informationCenterTree : list) { - if (StringUtils.isNotBlank(informationCenterTree.getPId())) { + if (StringUtils.isNotBlank(informationCenterTree.getParentId())) { SarLawsInformationCenterTreeData informationCenterTreeData = new SarLawsInformationCenterTreeData(); BeanUtils.copyProperties(informationCenterTree, informationCenterTreeData); treeData.add(informationCenterTreeData); @@ -105,7 +105,7 @@ public class SarLawsInformationCenterTreeServiceImpl extends ServiceImpl roleIds = tsRoleDao.getResourceId(pId); for (String roleId : roleIds){ tsRoleDao.addResource(roleId,informationCenterTree.getId()); @@ -119,7 +119,7 @@ public class SarLawsInformationCenterTreeServiceImpl extends ServiceImpl data1=new ArrayList<>(); res.setChildren(data1); } - if (res.getId().equals(data.getPId())){ + if (res.getId().equals(data.getParentId())){ if (null!=res.getChildren()){ res.getChildren().add(data); }else { diff --git a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsInformationCenterTree/SarLawsInformationCenterTreeMapper.xml b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsInformationCenterTree/SarLawsInformationCenterTreeMapper.xml index 0b709092..715d7379 100644 --- a/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsInformationCenterTree/SarLawsInformationCenterTreeMapper.xml +++ b/adc-da-slrs/src/main/resources/mybatis/mapper/sarLawsInformationCenterTree/SarLawsInformationCenterTreeMapper.xml @@ -6,13 +6,13 @@ - + - id,p_id,`name`, + id,parent_id,`name`, sort