jdbctemper更新数据写法
作者:互联网
NamedParameterJdbcTemplate namedParameterJdbcTemplate = null;
namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(jdbcTemplate);
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("readperson", user.getId());
paramMap.put("readtime", shijian);
paramMap.put("readcontent", readcontent);
paramMap.put("id", cusId);
paramMap.put("cusreadstate", "2");
paramMap.put("cusid", kehuid);
paramMap.put("time", date);
paramMap.put("retalkstate", retalkstate);
String sql="update ld_customer_progress set readperson=:readperson,readtime=:readtime,readcontent=:readcontent,retalkstate=:retalkstate where id=:id ";
int a=namedParameterJdbcTemplate.update(sql, paramMap);
标签:retalkstate,更新,readcontent,paramMap,put,写法,id,jdbctemper,readtime 来源: https://www.cnblogs.com/gxl1/p/15013805.html