| | |
| | | throw new SQLException("插入学员失败"); |
| | | } |
| | | |
| | | // 注意:表名为 t_avtivity_player(按 db.sql 拼写) |
| | | // 插入活动报名数据 |
| | | private long insertActivityPlayer(Connection conn, long activityId, long playerId) throws SQLException { |
| | | String sql = "INSERT INTO t_avtivity_player (activity_id, player_id) VALUES (?, ?)"; |
| | | String sql = "INSERT INTO t_activity_player (activity_id, player_id) VALUES (?, ?)"; |
| | | try (PreparedStatement ps = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) { |
| | | ps.setLong(1, activityId); |
| | | ps.setLong(2, playerId); |