map 转 po

https://blog.51cto.com/u_16099328/7834271

//			sSql = "";
//			sSql = " Select * From cppcc_wylzpf Where wy_id In ("+ cppccContact.getJoinIds() +") ";
//
//			List<Map<String, Object>> lst = customSqlService.runListSql(sSql);
//
//			for(Map<String, Object> mp: lst){
//				CppccWylzpf po = new CppccWylzpf();
//				po = BeanUtil.toBeanIgnoreCase(mp, CppccWylzpf.class, false);
//另一种写法 po = BeanUtil.fillBeanWithMapIgnoreCase(mp, new CppccWylzpf(), false);

//				lstWyLzPf.add(po);
//			}
SubPerson person = new SubPerson();
person.setAge(14);
person.setOpenid("11213232");
person.setName("测试A11");
person.setSubName("sub名字");

Map<String, Object> map = BeanUtil.beanToMap(person);
map 拷贝
map1.putAll(map)

map 深拷贝
map1 = CloneUtils.clone(map)

属性拷贝
https://blog.csdn.net/baidu_28370189/article/details/130923041

https://www.jb51.net/article/254836.htm

image

posted @ 2022-10-10 10:02  寒冷的雨呢  阅读(71)  评论(0编辑  收藏  举报