List<Map<String,Object>> qlist=ttptOrderMMapper.selectList(tptQuery); Map<String,Object> map=qlist.stream().collect(Collectors.toMap(a1->a1.get("mapkeyid"),a2->a2));
java8将List<Map<String,Object>>转换为Map
最新推荐文章于 2024-09-08 10:40:56 发布
List<Map<String,Object>> qlist=ttptOrderMMapper.selectList(tptQuery); Map<String,Object> map=qlist.stream().collect(Collectors.toMap(a1->a1.get("mapkeyid"),a2->a2));