public void addSubscibe(List<PermedipUserSubscribeVo> list) {
final List<PermedipUserSubscribeVo> vos=list;
String sql="insert into permedip_user_subscribe(user_id,channel_name) values(?,?)";
jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() { @Override
public void setValues(PreparedStatement ps, int i) throws SQLException {
ps.setInt(1, vos.get(i).getUserId());
ps.setString(2, vos.get(i).getChannelName());
} @Override
public int getBatchSize() {
return vos.size();
}
});
}