修改bug

This commit is contained in:
yangjun 2025-08-25 15:02:17 +08:00
parent 1477d4b15b
commit 614f9b6623
4 changed files with 10 additions and 6 deletions

View File

@ -80,4 +80,5 @@ public class InstructionTag implements Serializable {
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
private java.lang.String icon;
}

View File

@ -18,14 +18,16 @@ public class TreeNode {
private String categoryId;
private String typeId;
private String izEnabled;
private String icon;
private Integer sort;
private boolean canAdd;
private boolean showContent;
private List<TreeNode> children = new ArrayList<>();
private List<DirectiveBodyTag> bodyTagList;
private List<DirectiveEmotionTag> emotionTagList;
private boolean parentLevelEnabled;//父级及往上是否启用
public TreeNode(String instructionId,String categoryId,String typeId,String key, String title,int level,String cycleTypeName,String izEnabled,Integer sort,boolean canAdd,boolean parentLevelEnabled) {
public TreeNode(String instructionId,String categoryId,String typeId,String key, String title,int level,String cycleTypeName,String izEnabled,Integer sort,boolean canAdd,boolean parentLevelEnabled,String icon) {
this.instructionId = instructionId;
this.categoryId = categoryId;
this.typeId = typeId;
@ -37,6 +39,7 @@ public class TreeNode {
this.sort = sort;
this.canAdd = canAdd;
this.parentLevelEnabled = parentLevelEnabled;
this.icon = icon;
}
public void addChild(TreeNode node) { children.add(node); }

View File

@ -179,7 +179,7 @@
<!-- 查询被使用的一、二、三级分类(包含已删除,只要存在未删指令引用) -->
<select id="getUsedInstructionTags" resultType="com.nu.modules.instructiontag.entity.InstructionTag">
SELECT id, instruction_name, sort, iz_enabled
SELECT id, instruction_name, sort, iz_enabled,icon
FROM nu_config_service_instruction_tag
WHERE del_flag = '0'
ORDER BY sort ASC

View File

@ -398,7 +398,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !insUsing) {
continue;
}
TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing, true);
TreeNode instNode = new TreeNode(inst.getId(), "", "", inst.getId(), inst.getInstructionName(), 1, "", inst.getIzEnabled(), inst.getSort(), insUsing, true,inst.getIcon());
List<ConfigServiceCategory> catList = catMap.get(inst.getId());
if (catList != null) {
catList.sort(Comparator.comparingInt(ConfigServiceCategory::getSort));
@ -407,7 +407,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !catUsing) {
continue;
}
TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing, insUsing);
TreeNode catNode = new TreeNode(inst.getId(), cat.getId(), "", cat.getId(), cat.getCategoryName(), 2, "", cat.getIzEnabled(), cat.getSort(), insUsing && catUsing, insUsing,"");
List<ConfigServiceType> typeList = typeMap.get(cat.getId());
if (typeList != null) {
typeList.sort(Comparator.comparingInt(ConfigServiceType::getSort));
@ -416,7 +416,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && !typUsing) {
continue;
}
TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing, insUsing && catUsing);
TreeNode typeNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), tp.getId(), tp.getTypeName(), 3, "", tp.getIzEnabled(), tp.getSort(), insUsing && catUsing && typUsing, insUsing && catUsing,"");
List<ConfigServiceDirective> dirList = directiveMap.get(tp.getId());
if (dirList != null) {
dirList.sort(Comparator.comparingInt(ConfigServiceDirective::getSort));
@ -424,7 +424,7 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
if ("enabled".equals(filterIzEnabled) && "1".equals(dir.getIzEnabled())) {
continue;
}
TreeNode dirNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), dir.getId(), dir.getDirectiveName(), 4, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing, insUsing && catUsing && typUsing);
TreeNode dirNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), dir.getId(), dir.getDirectiveName(), 4, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing, insUsing && catUsing && typUsing,"");
// TreeNode tagNode = new TreeNode(inst.getId(), cat.getId(), tp.getId(), IdUtil.simpleUUID(), "标签", 5, cycleTypeMap.get(dir.getCycleType()), dir.getIzEnabled(), dir.getSort(), insUsing && catUsing && typUsing,insUsing && catUsing && typUsing);
// tagNode.setBodyTagList(dir.getBodyTagList());
// tagNode.setEmotionTagList(dir.getEmotionTagList());