List<BasCurrency> currencyList=svc.findList(BasCurrency.class,"select * from bas_currency"); List<SysEnumDict> dictList=svc.findList(SysEnumDict.class,"select * from sys_enum_dict"); Map<String, BasCurrency> currencyDict= currencyList.stream().collect(Collectors.toMap(k -> k.getCurrencyCode(), part -> part)); Map<String,SysEnumDict> enumNameDict= dictList.stream().collect(Collectors.toMap(k -> String.valueOf(k.getEnumValue()), part -> part));