把Map转成实体对象:
LoginEntity loginEntity = new LoginEntity();//任意实体类
Map map = new HashMap();
Field[] fields = object.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
try {
map.put(field.getName(), field.get(loginEntity));
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}