From ba94ceae1315174798ae1967ef62268c6d16cd5b Mon Sep 17 00:00:00 2001 From: Codex Assistant <codex@example.com> Date: 星期一, 06 十月 2025 22:07:06 +0800 Subject: [PATCH] feat: 评审与活动相关改动 - backend(GraphQL): Activity schema 增加 updateActivityState(id, state);实现 resolver/service 仅更新 state=2 作为逻辑删除 - backend(GraphQL): region.graphqls 新增 Query leafRegions - backend(GraphQL): player.graphqls 的 projectReviewApplications 增加可选参数 regionId - backend(Service): listProjectReviewApplications 绑定 regionId 参数,修复 QueryParameterException - frontend(web): 新增 api/activity.js 的 updateActivityState 并接入 activity-list 删除逻辑 - frontend(web): review-list.vue 权限仅校验登录,移除角色限制;查询参数修正为 name/regionId - frontend(web): 删除未引用的 ActivityList.vue - frontend(web): projectReviewNew.js GraphQL 查询增加 name 参数 --- backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java | 25 ++++++++++++++++++++++--- 1 files changed, 22 insertions(+), 3 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 fdef59a..a58e054 100644 --- a/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java +++ b/backend/src/main/java/com/rongyichuang/player/api/PlayerGraphqlApi.java @@ -6,12 +6,14 @@ 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; @@ -22,6 +24,7 @@ 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; @@ -43,17 +46,20 @@ 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 @@ -81,12 +87,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); } @@ -96,6 +103,18 @@ @QueryMapping public ActivityPlayerDetailResponse activityPlayerDetail(@Argument Long id) { 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); } /** @@ -325,4 +344,4 @@ return PromotionResult.failure("鏅嬬骇鎿嶄綔澶辫触: " + e.getMessage()); } } -} \ No newline at end of file +} -- Gitblit v1.8.0