use of org.jeecg.common.system.vo.DictModelMany in project jeecg-boot by jeecgboot.
the class SysDictServiceImpl method queryDictItemsByCodeList.
@Override
public Map<String, List<DictModel>> queryDictItemsByCodeList(List<String> dictCodeList) {
List<DictModelMany> list = sysDictMapper.queryDictItemsByCodeList(dictCodeList);
Map<String, List<DictModel>> dictMap = new HashMap<>();
for (DictModelMany dict : list) {
List<DictModel> dictItemList = dictMap.computeIfAbsent(dict.getDictCode(), i -> new ArrayList<>());
dict.setDictCode(null);
dictItemList.add(new DictModel(dict.getValue(), dict.getText()));
}
return dictMap;
}
use of org.jeecg.common.system.vo.DictModelMany in project jeecg-boot by jeecgboot.
the class SysDictServiceImpl method queryManyDictByKeys.
@Override
public Map<String, List<DictModel>> queryManyDictByKeys(List<String> dictCodeList, List<String> keys) {
List<DictModelMany> list = sysDictMapper.queryManyDictByKeys(dictCodeList, keys);
Map<String, List<DictModel>> dictMap = new HashMap<>();
for (DictModelMany dict : list) {
List<DictModel> dictItemList = dictMap.computeIfAbsent(dict.getDictCode(), i -> new ArrayList<>());
dictItemList.add(new DictModel(dict.getValue(), dict.getText()));
}
return dictMap;
}
Aggregations