JdbcTemplate 批量导入
//拼接sql
String sql = SqlUtils.batchForSceneDOSql(tableName, columnArr);
//将入库数据分批导入
List> partitionList = Lists.partition(list, 500);
//批量导入
for (List
//onlineFormJdbcDao.get() 获取jdbcTemplate
onlineFormJdbcDao.get().batchUpdate(sql, new BatchPreparedStatementSetter() {
public void setValues(PreparedStatement ps, int i) throws SQLException {
ps.setString(1, scenes.get(i).getSceneName());
ps.s
共有 0 条评论