将map映射成实体
一、利用插件
1.hfxy_merchant 为实体类 bean
2.Map<String,Object> paramMap
3.导入的包
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
hfxy_merchant merchant = new Gson().fromJson(new JSONObject(paramMap).toJSONString(), hfxy_merchant.class);
二、利用反射
需要注意的是:利用反射的方式来做,需要注意的是javaBean参数的类型需要是封装类int->Integer boolean->Boolean
1.实体类
public class hfxy_merchant {
public Integer merchant_id;
public String merchant_num;
public String mercha