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