|
|
@ -90,6 +90,7 @@ public class ComDictionaryServiceImpl extends ServiceImpl<ComDictionaryMapper, C
|
|
|
|
List<ComDictionary> otherList = new ArrayList<>();
|
|
|
|
List<ComDictionary> otherList = new ArrayList<>();
|
|
|
|
ComDictionary comDictionary = new ComDictionary();
|
|
|
|
ComDictionary comDictionary = new ComDictionary();
|
|
|
|
comDictionary.setType(dictType);
|
|
|
|
comDictionary.setType(dictType);
|
|
|
|
|
|
|
|
comDictionary.setDataStatus(dictionaryByTypeParam.getStatus());
|
|
|
|
Wrapper<ComDictionary> wrapper = Wrappers.query(comDictionary);
|
|
|
|
Wrapper<ComDictionary> wrapper = Wrappers.query(comDictionary);
|
|
|
|
queryList = this.comDictionaryMapper.selectList(wrapper);
|
|
|
|
queryList = this.comDictionaryMapper.selectList(wrapper);
|
|
|
|
changeTree(queryList,otherList);
|
|
|
|
changeTree(queryList,otherList);
|
|
|
@ -105,7 +106,7 @@ public class ComDictionaryServiceImpl extends ServiceImpl<ComDictionaryMapper, C
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// 平铺数据
|
|
|
|
// 平铺数据
|
|
|
|
if (Integer.valueOf(0).equals(dictionaryByTypeParam.getIsTree())){
|
|
|
|
if (Integer.valueOf(0).equals(dictionaryByTypeParam.getIsTree())){
|
|
|
|
resultMap.put(dictType,otherList.get(0).getChild());
|
|
|
|
resultMap.put(dictType,CollUtil.isNotEmpty(otherList) ? otherList.get(0).getChild() : new ArrayList<>());
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
// 树形数据
|
|
|
|
// 树形数据
|
|
|
|
resultMap.put(dictType,otherList);
|
|
|
|
resultMap.put(dictType,otherList);
|
|
|
@ -209,4 +210,15 @@ public class ComDictionaryServiceImpl extends ServiceImpl<ComDictionaryMapper, C
|
|
|
|
return "";
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Boolean updateCategory(ComDictionary dictionary) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Assert.notNull(dictionary.getId(), "id不能为空");
|
|
|
|
|
|
|
|
Assert.notEmpty(dictionary.getLabel(), "字典名称不能为空");
|
|
|
|
|
|
|
|
this.lambdaUpdate().eq(ComDictionary::getId,dictionary.getId())
|
|
|
|
|
|
|
|
.set(ComDictionary::getNote,dictionary.getNote())
|
|
|
|
|
|
|
|
.set(ComDictionary::getLabel,dictionary.getLabel()).update();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|