| | |
| | | if (activityId != null) { |
| | | q.setParameter("activityId", activityId); |
| | | } |
| | | if (regionId != null) { |
| | | q.setParameter("regionId", regionId); |
| | | } |
| | | if (state != null) { |
| | | q.setParameter("state", state); |
| | | } |
| | |
| | | * 与listApplications的区别:不过滤复赛和决赛阶段 |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public PageResponse<ActivityPlayerApplicationResponse> listProjectReviewApplications(String name, Long activityId, Integer state, Integer page, Integer size) { |
| | | public PageResponse<ActivityPlayerApplicationResponse> listProjectReviewApplications(String name, Long activityId, Long regionId, Integer state, Integer page, Integer size) { |
| | | String baseSql = |
| | | "SELECT ap.id, CONCAT(p.name, '(', ap.project_name, ')') AS player_name, stage.name AS activity_name, ap.project_name AS project_name, p.phone AS phone, ap.create_time AS apply_time, ap.state AS state, " + |
| | | "COALESCE(rating_stats.rating_count, 0) AS rating_count, rating_stats.average_score " + |
| | |
| | | } |
| | | // 直接查询指定阶段ID的报名项目 |
| | | whereClause.append("ap.stage_id = :activityId"); |
| | | hasCondition = true; |
| | | } |
| | | |
| | | if (regionId != null) { |
| | | if (hasCondition) { |
| | | whereClause.append(" AND "); |
| | | } |
| | | whereClause.append("ap.region_id = :regionId"); |
| | | hasCondition = true; |
| | | } |
| | | |
| | |
| | | if (activityId != null) { |
| | | q.setParameter("activityId", activityId); |
| | | } |
| | | if (regionId != null) { |
| | | q.setParameter("regionId", regionId); |
| | | } |
| | | if (state != null) { |
| | | q.setParameter("state", state); |
| | | } |