Codex Assistant
10 小时以前 ba94ceae1315174798ae1967ef62268c6d16cd5b
backend/src/main/java/com/rongyichuang/player/service/PlayerApplicationService.java
@@ -83,6 +83,9 @@
        if (activityId != null) {
            q.setParameter("activityId", activityId);
        }
        if (regionId != null) {
            q.setParameter("regionId", regionId);
        }
        if (state != null) {
            q.setParameter("state", state);
        }
@@ -126,7 +129,7 @@
     * 与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 " +
@@ -159,6 +162,14 @@
            }
            // 直接查询指定阶段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;
        }
        
@@ -197,6 +208,9 @@
        if (activityId != null) {
            q.setParameter("activityId", activityId);
        }
        if (regionId != null) {
            q.setParameter("regionId", regionId);
        }
        if (state != null) {
            q.setParameter("state", state);
        }