fix: 标签管理报错
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import com.jero.modules.system.service.TreeNode;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -183,7 +184,8 @@ public class SysDictItem implements TreeNode {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "是否是叶子节点")
|
||||
private boolean isLeaf;
|
||||
@JsonProperty("isLeaf")
|
||||
private boolean leafFlag;
|
||||
|
||||
@Override
|
||||
public String obtainTreeNodeId() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.jero.modules.system.service.TreeNode;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -103,7 +104,8 @@ public class PartName implements Serializable, TreeNode {
|
||||
*/
|
||||
@ApiModelProperty(value = "是否是叶子节点")
|
||||
@TableField(exist = false)
|
||||
private boolean isLeaf;
|
||||
@JsonProperty("isLeaf")
|
||||
private boolean leafFlag;
|
||||
|
||||
/**
|
||||
* 子零部件
|
||||
|
||||
+2
-6
@@ -3,7 +3,6 @@ package com.jero.modules.laws.standard.service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -14,9 +13,6 @@ import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class DictTreeService {
|
||||
|
||||
@Resource
|
||||
private ISysDictService dictService;
|
||||
|
||||
@Resource
|
||||
private ISysDictItemService dictItemService;
|
||||
|
||||
@@ -40,7 +36,7 @@ public class DictTreeService {
|
||||
List<SysDictItem> childList = dictItemService.list(queryWrapper);
|
||||
list.forEach(item -> {
|
||||
if (childList.stream().anyMatch(child -> child.getParentId().equals(item.getId()))) {
|
||||
item.setLeaf(false);
|
||||
item.setLeafFlag(false);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
@@ -73,7 +69,7 @@ public class DictTreeService {
|
||||
List<SysDictItem> childList = dictItemService.list(queryWrapper);
|
||||
list.forEach(item -> {
|
||||
if (childList.stream().anyMatch(child -> child.getParentId().equals(item.getId()))) {
|
||||
item.setLeaf(false);
|
||||
item.setLeafFlag(false);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
|
||||
+2
-2
@@ -196,7 +196,7 @@ public class PartNameServiceImpl extends ServiceImpl<PartNameMapper, PartName>
|
||||
List<PartName> childList = list(queryWrapper);
|
||||
list.forEach(item -> {
|
||||
if (childList.stream().anyMatch(child -> child.getParentCode().equals(item.getCode()))) {
|
||||
item.setLeaf(false);
|
||||
item.setLeafFlag(false);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
@@ -221,7 +221,7 @@ public class PartNameServiceImpl extends ServiceImpl<PartNameMapper, PartName>
|
||||
List<PartName> childList = list(queryWrapper);
|
||||
list.forEach(item -> {
|
||||
if (childList.stream().anyMatch(child -> child.getParentCode().equals(item.getCode()))) {
|
||||
item.setLeaf(false);
|
||||
item.setLeafFlag(false);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user