From f04f35b562760afbac0c477357e2a29f77aec3b9 Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期四, 02 十月 2025 13:51:47 +0800
Subject: [PATCH] fix: 修复评审次数重复显示问题

---
 backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java |   43 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java b/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java
index adce16f..f535211 100644
--- a/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java
+++ b/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java
@@ -1,9 +1,12 @@
 package com.rongyichuang.player.api;
 
+import com.rongyichuang.common.dto.PageResponse;
 import com.rongyichuang.player.dto.input.ActivityPlayerRatingInput;
 import com.rongyichuang.player.dto.ActivityRegistrationInput;
 import com.rongyichuang.player.dto.response.ActivityPlayerApplicationResponse;
 import com.rongyichuang.player.dto.response.ActivityPlayerDetailResponse;
+import com.rongyichuang.player.dto.response.ProjectReviewApplicationPageResponse;
+import com.rongyichuang.player.dto.response.PlayerApplicationPageResponse;
 import com.rongyichuang.player.dto.ActivityRegistrationResponse;
 import com.rongyichuang.player.dto.response.JudgeRatingStatusResponse;
 import com.rongyichuang.player.dto.response.CurrentJudgeRatingResponse;
@@ -53,14 +56,32 @@
     }
 
     @QueryMapping
-    public List<ActivityPlayerApplicationResponse> activityPlayerApplications(
+    public PlayerApplicationPageResponse activityPlayerApplications(
             @Argument String name,
             @Argument Long activityId,
             @Argument Integer state,
             @Argument Integer page,
             @Argument Integer size
     ) {
-        return service.listApplications(name, activityId, state, page, size);
+        PageResponse<ActivityPlayerApplicationResponse> pageResponse = 
+            service.listApplications(name, activityId, state, page, size);
+        return PlayerApplicationPageResponse.from(pageResponse);
+    }
+
+    /**
+     * 椤圭洰璇勫涓撶敤鏌ヨ锛屽寘鍚墍鏈夐樁娈垫暟鎹紙鍖呮嫭澶嶈禌銆佸喅璧涳級
+     */
+    @QueryMapping
+    public ProjectReviewApplicationPageResponse projectReviewApplications(
+            @Argument String name,
+            @Argument Long activityId,
+            @Argument Integer state,
+            @Argument Integer page,
+            @Argument Integer size
+    ) {
+        PageResponse<ActivityPlayerApplicationResponse> pageResponse = 
+            service.listProjectReviewApplications(name, activityId, state, page, size);
+        return ProjectReviewApplicationPageResponse.from(pageResponse);
     }
 
     /**
@@ -133,6 +154,24 @@
     }
 
     /**
+     * 妫�鏌ヨ瘎濮旀槸鍚﹀湪鎸囧畾姣旇禌闃舵鐨勮瘎濮斿垪琛ㄤ腑
+     */
+    @QueryMapping
+    public Boolean isJudgeInActivity(@Argument Long stageId, @Argument Long judgeId) {
+        log.info("妫�鏌ヨ瘎濮旀潈闄愶紝stageId: {}, judgeId: {}", stageId, judgeId);
+        return ratingService.isJudgeInActivity(stageId, judgeId);
+    }
+
+    /**
+     * 鑾峰彇鎸囧畾璇勫鐨勮瘎鍒嗘槑缁�
+     */
+    @QueryMapping
+    public CurrentJudgeRatingResponse judgeRatingDetail(@Argument Long activityPlayerId, @Argument Long judgeId) {
+        log.info("鑾峰彇鎸囧畾璇勫璇勫垎鏄庣粏锛宎ctivityPlayerId: {}, judgeId: {}", activityPlayerId, judgeId);
+        return ratingService.getJudgeRatingDetail(activityPlayerId, judgeId);
+    }
+
+    /**
      * 鎻愪氦娲诲姩鎶ュ悕
      */
     @MutationMapping

--
Gitblit v1.8.0