|
|
@@ -290,12 +290,19 @@ public class DictionaryService extends SuperService {
|
|
|
return ResultContent.buildContent(dictionaryItemList.stream().map(this::toItemModel).toList());
|
|
|
}
|
|
|
|
|
|
- public Object deepTreeItem(String projectId, String dictionaryKey){
|
|
|
- if (StringUtils.isBlank(dictionaryKey)){
|
|
|
- return ResultContent.buildFail("字典编码不能为空");
|
|
|
+ public Object deepTreeItem(String projectId, String dictionaryKey, String dictionaryId){
|
|
|
+ if (StringUtils.isBlank(dictionaryKey) && StringUtils.isBlank(dictionaryId)){
|
|
|
+ return ResultContent.buildFail("字典编码和字典id不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ Dictionary dictionary = null;
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(dictionaryId)){
|
|
|
+ dictionary = dictionaryDao.findTopById(dictionaryId);
|
|
|
+ }else if (StringUtils.isNotBlank(dictionaryKey)){
|
|
|
+ dictionary = dictionaryDao.findTopByProjectIdAndKey(projectId, dictionaryKey);
|
|
|
}
|
|
|
|
|
|
- Dictionary dictionary = dictionaryDao.findTopByProjectIdAndKey(projectId, dictionaryKey);
|
|
|
if (dictionary == null){
|
|
|
return ResultContent.buildFail("字典不存在");
|
|
|
}
|