mirror of https://github.com/jeecgboot/jeecg-boot
fix(ResourceUtil.java): 修复枚举转中文时,keys传多个也只add第1个的问题
parent
157877f9a6
commit
509ac3f8ec
|
@ -100,18 +100,19 @@ public class ResourceUtil {
|
|||
}
|
||||
Map<String, List<DictModel>> map = new HashMap<>();
|
||||
for (String code : enumDictData.keySet()) {
|
||||
if(dictCodeList.indexOf(code)>=0){
|
||||
List<DictModel> dictItemList = enumDictData.get(code);
|
||||
for(DictModel dm: dictItemList){
|
||||
String value = dm.getValue();
|
||||
if(keys.indexOf(value)>=0){
|
||||
List<DictModel> list = new ArrayList<>();
|
||||
list.add(new DictModel(value, dm.getText()));
|
||||
map.put(code,list);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(dictCodeList.indexOf(code)<0){
|
||||
continue;
|
||||
}
|
||||
List<DictModel> dictItemList = enumDictData.get(code);
|
||||
List<DictModel> list = new ArrayList<>();
|
||||
for(DictModel dm: dictItemList){
|
||||
String value = dm.getValue();
|
||||
if(keys.indexOf(value)<0){
|
||||
continue;
|
||||
}
|
||||
list.add(new DictModel(value, dm.getText()));
|
||||
}
|
||||
map.put(code,list);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue