From 4fa9591629721797386fc11836e3a9deb69cd58c Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期三, 24 九月 2025 17:00:37 +0800
Subject: [PATCH] 修改评分逻辑,支持多个评委
---
backend/src/main/resources/graphql/player.graphqls | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 1 deletions(-)
diff --git a/backend/src/main/resources/graphql/player.graphqls b/backend/src/main/resources/graphql/player.graphqls
index 71bea78..f11a00a 100644
--- a/backend/src/main/resources/graphql/player.graphqls
+++ b/backend/src/main/resources/graphql/player.graphqls
@@ -1,6 +1,12 @@
extend type Query {
- activityPlayerApplications(name: String, page: Int, size: Int): [ActivityPlayerApplicationResponse!]!
+ activityPlayerApplications(name: String, activityId: ID, page: Int, size: Int): [ActivityPlayerApplicationResponse!]!
activityPlayerDetail(id: ID!): ActivityPlayerDetailResponse
+
+ # 璇勫垎鐩稿叧鏌ヨ
+ judgeRatingsForPlayer(activityPlayerId: ID!): [JudgeRatingStatusResponse!]!
+ currentJudgeRating(activityPlayerId: ID!): CurrentJudgeRatingResponse
+ averageScoreForPlayer(activityPlayerId: ID!): Float
+ currentJudgeInfo: CurrentJudgeInfoResponse
}
extend type Mutation {
@@ -64,4 +70,39 @@
input ActivityPlayerRatingItemInput {
itemId: ID!
score: Int!
+}
+
+# 璇勫璇勫垎鐘舵�佸搷搴旂被鍨�
+type JudgeRatingStatusResponse {
+ judgeId: ID!
+ judgeName: String!
+ hasRated: Boolean!
+ ratingTime: String
+ totalScore: Float
+}
+
+# 褰撳墠璇勫璇勫垎鍝嶅簲绫诲瀷
+type CurrentJudgeRatingResponse {
+ activityPlayerId: ID!
+ judgeId: ID!
+ ratings: [RatingItemScoreResponse!]!
+ comment: String
+ totalScore: Float
+ ratingTime: String
+}
+
+# 璇勫垎椤圭洰鍒嗘暟鍝嶅簲绫诲瀷
+type RatingItemScoreResponse {
+ itemId: ID!
+ itemName: String!
+ score: Int!
+ maxScore: Int!
+}
+
+# 褰撳墠璇勫淇℃伅鍝嶅簲绫诲瀷
+type CurrentJudgeInfoResponse {
+ judgeId: ID!
+ judgeName: String!
+ title: String
+ company: String
}
\ No newline at end of file
--
Gitblit v1.8.0