From c4a9cad1c50e89365e2a58b50e259af642ed3b8c Mon Sep 17 00:00:00 2001 From: Codex Assistant <codex@example.com> Date: 星期二, 07 十月 2025 16:12:20 +0800 Subject: [PATCH] feat(review): 调整评审详情展示顺序与样式,描述支持多行,项目信息列宽40/60 fix(auth): 登录页与首页循环跳转保护;api.ts 在登录页不再重定向;401分支在登录页不跳转 fix(router): /login 放行策略优化,避免死循环;评审列表跳转到 /project-review/:id/detail fix(frontend): 补齐 utils/appConfig.ts,避免启动白屏 fix(review): 详情页提交评分缺少stageId时回退使用项目详情的stageId feat(backend): ActivityPlayerDetailResponse.playerInfo 补充 avatarUrl/avatar,服务组装时填充用户头像 chore(dev): 启动脚本注入本地JWT密钥,重启前后端 --- backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java | 80 ++++++++++++++++++++++++++++++++++++++-- 1 files changed, 76 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 adce16f..a58e054 100644 --- a/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java +++ b/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java @@ -1,23 +1,30 @@ 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.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.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; @@ -39,28 +46,55 @@ 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 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 Long regionId, + @Argument Integer state, + @Argument Integer page, + @Argument Integer size + ) { + PageResponse<ActivityPlayerApplicationResponse> pageResponse = + service.listProjectReviewApplications(name, activityId, regionId, state, page, size); + return ProjectReviewApplicationPageResponse.from(pageResponse); } /** @@ -71,11 +105,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); } @@ -130,6 +184,24 @@ public CurrentJudgeInfoResponse currentJudgeInfo() { log.info("鑾峰彇褰撳墠璇勫淇℃伅"); return ratingService.getCurrentJudgeInfo(); + } + + /** + * 妫�鏌ヨ瘎濮旀槸鍚﹀湪鎸囧畾姣旇禌闃舵鐨勮瘎濮斿垪琛ㄤ腑 + */ + @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); } /** @@ -272,4 +344,4 @@ return PromotionResult.failure("鏅嬬骇鎿嶄綔澶辫触: " + e.getMessage()); } } -} \ No newline at end of file +} -- Gitblit v1.8.0