From 3714621173c606c4c58439ed8941100ce9ddea14 Mon Sep 17 00:00:00 2001
From: Codex Assistant <codex@example.com>
Date: 星期三, 05 十一月 2025 15:10:49 +0800
Subject: [PATCH] bug
---
backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java | 42 ++++++++++++++++++++++++++++++++++++++----
1 files changed, 38 insertions(+), 4 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 f535211..67f728c 100644
--- a/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java
+++ b/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java
@@ -6,21 +6,26 @@
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.ProjectStageTimelineResponse;
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;
import com.rongyichuang.player.dto.response.CurrentJudgeInfoResponse;
import com.rongyichuang.player.dto.response.PlayerRegistrationResponse;
+import com.rongyichuang.player.dto.response.StageJudgeRatingDetailResponse;
import com.rongyichuang.player.dto.PromotionCompetitionResponse;
+import com.rongyichuang.player.dto.response.PromotionCompetitionPageResponse;
import com.rongyichuang.player.dto.CompetitionParticipantResponse;
import com.rongyichuang.player.dto.PromotionInput;
import com.rongyichuang.player.dto.PromotionResult;
import com.rongyichuang.player.dto.PromotableParticipantsResponse;
+import com.rongyichuang.player.entity.ActivityPlayer;
import com.rongyichuang.player.service.PlayerApplicationService;
import com.rongyichuang.player.service.ActivityPlayerDetailService;
import com.rongyichuang.player.service.ActivityPlayerRatingService;
import com.rongyichuang.player.service.ActivityPlayerService;
+import com.rongyichuang.player.service.ProjectStageRatingService;
import com.rongyichuang.player.service.PromotionService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,19 +47,27 @@
private final ActivityPlayerRatingService ratingService;
private final ActivityPlayerService activityPlayerService;
private final PromotionService promotionService;
+ private final ProjectStageRatingService projectStageRatingService;
public PlayerGraphqlApi(PlayerApplicationService service,
ActivityPlayerDetailService detailService,
ActivityPlayerRatingService ratingService,
ActivityPlayerService activityPlayerService,
- PromotionService promotionService) {
+ PromotionService promotionService,
+ ProjectStageRatingService projectStageRatingService) {
this.service = service;
this.detailService = detailService;
this.ratingService = ratingService;
this.activityPlayerService = activityPlayerService;
this.promotionService = promotionService;
+ this.projectStageRatingService = projectStageRatingService;
}
+ @QueryMapping
+ public ActivityPlayer myActivityPlayer(@Argument Long activityId) {
+ return activityPlayerService.getMyActivityPlayer(activityId);
+ }
+
@QueryMapping
public PlayerApplicationPageResponse activityPlayerApplications(
@Argument String name,
@@ -75,12 +88,13 @@
public ProjectReviewApplicationPageResponse projectReviewApplications(
@Argument String name,
@Argument Long activityId,
+ @Argument Long regionId,
@Argument Integer state,
@Argument Integer page,
@Argument Integer size
) {
PageResponse<ActivityPlayerApplicationResponse> pageResponse =
- service.listProjectReviewApplications(name, activityId, state, page, size);
+ service.listProjectReviewApplications(name, activityId, regionId, state, page, size);
return ProjectReviewApplicationPageResponse.from(pageResponse);
}
@@ -92,11 +106,31 @@
return detailService.getDetailForRating(id);
}
+ @QueryMapping
+ public ProjectStageTimelineResponse projectStageTimeline(@Argument Long activityPlayerId) {
+ log.info("鑾峰彇鍙傝禌椤圭洰闃舵鏃堕棿杞达紝activityPlayerId: {}", activityPlayerId);
+ return projectStageRatingService.getProjectStageTimeline(activityPlayerId);
+ }
+
+ @QueryMapping
+ public StageJudgeRatingDetailResponse stageJudgeRatings(@Argument Long activityPlayerId) {
+ log.info("鑾峰彇闃舵璇勫垎璇︽儏锛宎ctivityPlayerId: {}", activityPlayerId);
+ return projectStageRatingService.getStageJudgeRatings(activityPlayerId);
+ }
+
/**
* 鏌ヨ鐜╁鍦ㄦ寚瀹氭椿鍔ㄤ腑鐨勬姤鍚嶇姸鎬�
*/
@QueryMapping
public PlayerRegistrationResponse playerRegistration(@Argument Long activityId) {
+ return activityPlayerService.getPlayerRegistration(activityId);
+ }
+
+ /**
+ * 鏌ヨ鐜╁鍦ㄦ寚瀹氭椿鍔ㄤ腑鐨勬姤鍚嶇姸鎬侊紙鍒悕锛岄伩鍏嶆贩娣嗭級
+ */
+ @QueryMapping(name = "getPlayerRegistrationState")
+ public PlayerRegistrationResponse getPlayerRegistrationState(@Argument Long activityId) {
return activityPlayerService.getPlayerRegistration(activityId);
}
@@ -252,7 +286,7 @@
* 鑾峰彇姣旇禌鏅嬬骇鍒楄〃
*/
@QueryMapping
- public List<PromotionCompetitionResponse> promotionCompetitions(
+ public PromotionCompetitionPageResponse promotionCompetitions(
@Argument String name,
@Argument Integer page,
@Argument Integer size) {
@@ -311,4 +345,4 @@
return PromotionResult.failure("鏅嬬骇鎿嶄綔澶辫触: " + e.getMessage());
}
}
-}
\ No newline at end of file
+}
--
Gitblit v1.8.0