public void updateDoublePoints(final String[] games,final String[] servers,final Integer statu) {
?String sql ="UPDATE dim.dim_game_server SET is_double_points_game_server=? WHERE game=? AND game_server = ?";
?super.getJdbcTemplate().batchUpdate(sql, new BatchPreparedStatementSetter(){
?
? ?public int getBatchSize(){
? ?return games.length;
? }
? @Override
? public void setValues(java.sql.PreparedStatement ps, int i)
? ? throws SQLException {
? ?ps.setInt(1, statu);
? ?ps.setString(2, games[i]);
? ?ps.setString(3, servers[i]);
? }
?});
}
?
?
?@Override
?public void deleteTableCategory(List<TableCategory> tableCategoryList){
??String sql="DELETE FROM metadata.table_category WHERE db_name=:dbName AND table_category=:tableCategory AND table_name=:tableName";
??SqlParameterSource[] params = SqlParameterSourceUtils.createBatch(tableCategoryList.toArray());
??tableCategoryJdbcTemplate.batchUpdate(sql, params);
?}