java lambda

  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));

 

posted on 2018-12-14 16:06  听哥哥的话  阅读(103)  评论(0编辑  收藏  举报

导航