fix(ResourceUtil.java): 修复枚举转中文时,keys传多个也只add第1个的问题

pull/8387/head
York0519 2025-06-05 18:58:31 +08:00 committed by GitHub
parent 157877f9a6
commit 509ac3f8ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 11 deletions

View File

@ -100,18 +100,19 @@ public class ResourceUtil {
}
Map<String, List<DictModel>> map = new HashMap<>();
for (String code : enumDictData.keySet()) {
if(dictCodeList.indexOf(code)>=0){
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){
List<DictModel> list = new ArrayList<>();
if(keys.indexOf(value)<0){
continue;
}
list.add(new DictModel(value, dm.getText()));
}
map.put(code,list);
break;
}
}
}
}
return map;
}