mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 优化 !pr345 代码结构
This commit is contained in:
@ -281,14 +281,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
|
||||
|
||||
@Override
|
||||
public Map<String, String> getAllDictByDictType(String dictType) {
|
||||
List<SysDictData> thisDictTypeDataList = selectDictDataByType(dictType);
|
||||
Map<String, String> dictMap = null;
|
||||
for (SysDictData everyDictData : thisDictTypeDataList) {
|
||||
if (ObjectUtil.isNull(dictMap)) {
|
||||
dictMap = new HashMap<>();
|
||||
}
|
||||
dictMap.put(everyDictData.getDictValue(), everyDictData.getDictLabel());
|
||||
}
|
||||
return dictMap;
|
||||
List<SysDictData> list = selectDictDataByType(dictType);
|
||||
return StreamUtils.toMap(list, SysDictData::getDictValue, SysDictData::getDictLabel);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user