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/resources/graphql/judge.graphqls | 94 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 91 insertions(+), 3 deletions(-) diff --git a/backend/src/main/resources/graphql/judge.graphqls b/backend/src/main/resources/graphql/judge.graphqls index 8e6fe49..6b6c37e 100644 --- a/backend/src/main/resources/graphql/judge.graphqls +++ b/backend/src/main/resources/graphql/judge.graphqls @@ -10,6 +10,16 @@ "鑾峰彇鑵捐浜慍OS涓存椂涓婁紶鍑瘉" getUploadCredentials: CosCredentials + + # 璇勫璇勫鐩稿叧鏌ヨ + "鑾峰彇鎻愪氦璇︽儏" + getSubmissionDetail(submissionId: ID!): SubmissionDetailResponse + + # 妫�鏌ヨ瘎瀹$姸鎬� + checkReviewStatus(submissionId: ID!): ReviewStatusResponse + + # 鑾峰彇璇勫缁熻鏁版嵁 + judgeStats: JudgeStatsResponse } extend type Mutation { @@ -18,6 +28,13 @@ "鍒犻櫎璇勫" deleteJudge(id: ID): Boolean + + # 璇勫鐩稿叧mutation + "淇濆瓨璇勫鑽夌" + saveReviewDraft(input: ReviewDraftInput!): ReviewDraftResponse + + "鎻愪氦璇勫" + submitReview(input: ReviewSubmitInput!): ReviewSubmitResponse } "璇勫杈撳叆绫诲瀷" @@ -52,12 +69,14 @@ tags: [TagResponse] } -"鏍囩鍝嶅簲绫诲瀷" +# 鏍囩鍝嶅簲绫诲瀷锛堢敤浜庤瘎濮斾笓涓氶鍩燂級 type TagResponse { - id: ID - name: String + id: Long! + name: String! code: String } + + "鑵捐浜慍OS涓存椂鍑瘉绫诲瀷" type CosCredentials { @@ -68,3 +87,72 @@ expiration: String } +# 鎻愪氦璇︽儏鍝嶅簲绫诲瀷 +type SubmissionDetailResponse { + id: ID! + activityId: ID! + playerId: ID! + playerName: String + projectName: String + description: String + submissionFiles: [SubmissionMediaResponse] + currentScore: Float + maxScore: Int + reviewStatus: String +} + +# 璇勫鐘舵�佸搷搴旂被鍨� +type ReviewStatusResponse { + submissionId: ID! + reviewStatus: String + canReview: Boolean + hasReviewed: Boolean + currentScore: Float + reviewTime: String +} + +# 璇勫鑽夌杈撳叆绫诲瀷 +input ReviewDraftInput { + submissionId: ID! + scores: [ReviewScoreInput!]! + comments: String +} + +# 璇勫鎻愪氦杈撳叆绫诲瀷 +input ReviewSubmitInput { + submissionId: ID! + scores: [ReviewScoreInput!]! + comments: String + finalScore: Float! +} + +# 璇勫鍒嗘暟杈撳叆绫诲瀷 +input ReviewScoreInput { + itemId: ID! + score: Float! +} + +# 璇勫鑽夌鍝嶅簲绫诲瀷 +type ReviewDraftResponse { + id: ID! + submissionId: ID! + status: String + saveTime: String +} + +# 璇勫鎻愪氦鍝嶅簲绫诲瀷 +type ReviewSubmitResponse { + id: ID! + submissionId: ID! + finalScore: Float! + status: String + submitTime: String +} + +# 璇勫缁熻鍝嶅簲绫诲瀷 +type JudgeStatsResponse { + pendingReviews: Int! + completedReviews: Int! + totalReviews: Int! +} + -- Gitblit v1.8.0