bingo

The way to my programmer


  1. @Override
  2. public Integer UpdateOrgManage(String orgName, String bindNo, String fromUserName, String wxName) {
  3. KeyHolder key=new GeneratedKeyHolder();
  4. jdbcTemplate.update(new PreparedStatementCreator() {
  5. @Override
  6. public PreparedStatement createPreparedStatement(Connection con) throws SQLException {
  7. String sql="update sm_org set wx_open_id=?,wx_name=? where bind_no=? and name=?";
  8. PreparedStatement preState=con.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);
  9. preState.setString(1,fromUserName);
  10. preState.setString(2,wxName);
  11. preState.setString(3,bindNo);
  12. preState.setString(4,orgName);
  13. return preState;
  14. }
  15. }, key);
  16. //从主键持有者中获得主键值
  17. return key.getKeys().get("id");
  18. }


springboot pageHelper 分页异常 springboot-jpa LazyInitializationException