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;
@@ -14,6 +17,7 @@
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;
@@ -53,14 +57,37 @@
    }
    @QueryMapping
    public List<ActivityPlayerApplicationResponse> activityPlayerApplications(
    public ActivityPlayer myActivityPlayer(@Argument Long activityId) {
        return activityPlayerService.getMyActivityPlayer(activityId);
    }
    @QueryMapping
    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);
    }
    /**
@@ -76,6 +103,14 @@
     */
    @QueryMapping
    public PlayerRegistrationResponse playerRegistration(@Argument Long activityId) {
        return activityPlayerService.getPlayerRegistration(activityId);
    }
    /**
     * 查询玩家在指定活动中的报名状态(别名,避免混淆)
     */
    @QueryMapping(name = "getPlayerRegistrationState")
    public PlayerRegistrationResponse getPlayerRegistrationState(@Argument Long activityId) {
        return activityPlayerService.getPlayerRegistration(activityId);
    }
@@ -133,6 +168,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("获取指定评委评分明细,activityPlayerId: {}, judgeId: {}", activityPlayerId, judgeId);
        return ratingService.getJudgeRatingDetail(activityPlayerId, judgeId);
    }
    /**
     * 提交活动报名
     */
    @MutationMapping