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/activity.graphqls |  312 ++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 220 insertions(+), 92 deletions(-)

diff --git a/backend/src/main/resources/graphql/activity.graphqls b/backend/src/main/resources/graphql/activity.graphqls
index 50bddcd..ba530a4 100644
--- a/backend/src/main/resources/graphql/activity.graphqls
+++ b/backend/src/main/resources/graphql/activity.graphqls
@@ -1,97 +1,225 @@
-# 姣旇禌绠$悊 GraphQL Schema
-
-# 姣旇禌鍝嶅簲绫诲瀷
-type Activity {
-    id: ID!
-    pid: ID!
-    path: String!
-    name: String!
-    description: String
-    signupDeadline: String!
-    matchTime: String
-    address: String
-    ratingSchemeId: ID!
-    playerMax: Int
-    state: Int!
-    createTime: String!
-    updateTime: String!
-    
-    # 鍏宠仈鏁版嵁
-    ratingScheme: RatingScheme
-    stages: [Activity!]
-    parent: Activity
-    
-    # 缁熻鏁版嵁
-    playerCount: Int!
-    stateName: String!
-}
-
-# 姣旇禌鍒嗛〉鍝嶅簲
-type ActivityPageResponse {
-    content: [Activity!]!
-    totalElements: Int!
-    page: Int!
-    size: Int!
-}
-
-# 姣旇禌杈撳叆绫诲瀷
-input ActivityInput {
-    id: ID
-    pid: ID
-    name: String!
-    description: String
-    signupDeadline: String!
-    matchTime: String
-    address: String
-    ratingSchemeId: ID!
-    playerMax: Int
-    state: Int
-    stages: [ActivityStageInput!]
-    judges: [ActivityJudgeInput!]
-}
-
-# 姣旇禌闃舵杈撳叆绫诲瀷
-input ActivityStageInput {
-    id: ID
-    name: String!
-    description: String
-    matchTime: String
-    address: String
-    ratingSchemeId: ID
-    playerMax: Int
-    state: Int
-}
-
-# 姣旇禌璇勫杈撳叆绫诲瀷
-input ActivityJudgeInput {
-    judgeId: ID!
-    judgeName: String!
-    stageIds: [ID!]
-}
-
-# 鎵╁睍鏌ヨ
 extend type Query {
-    # 鍒嗛〉鏌ヨ姣旇禌鍒楄〃
-    activities(page: Int!, size: Int!, name: String): ActivityPageResponse!
-    
-    # 鑾峰彇姣旇禌璇︽儏
+
     activity(id: ID!): Activity
-    
-    # 鑾峰彇鎵�鏈夋瘮璧涳紙鐢ㄤ簬涓嬫媺閫夋嫨锛�
-    allActivities: [Activity!]!
-    
-    # 鑾峰彇姣旇禌鐨勬墍鏈夐樁娈�
-    activityStages(competitionId: ID!): [Activity!]!
-    
-    # 鑾峰彇杩涜涓殑姣旇禌
-    ongoingActivities: [Activity!]!
+
+    activities(page: Int!, size: Int!, name: String, state: Int): PageResponse
+
+    allActivities: [Activity]
+
+    allActivityStages: [Activity]
+
+    activityStages(activityId: ID!): [Activity]
+
+    ongoingActivities: [Activity]
+
+    # 瀵邦喕淇婄粩顖濆箯閸欐牗妞块崝銊ュ灙鐞�?
+
+    getActivities: [Activity]
+
+    # 閼惧嘲褰囨稉璇插閺傚湱绮虹拋鈩冩殶閹�?
+
+    organizerStats: OrganizerStatsResponse
+
 }
 
-# 鎵╁睍鍙樻洿
+
+
 extend type Mutation {
-    # 淇濆瓨姣旇禌锛堟柊澧炴垨缂栬緫锛�
-    saveActivity(input: ActivityInput!): Activity!
-    
-    # 鍒犻櫎姣旇禌
-    deleteActivity(id: ID!): Boolean!
-}
\ No newline at end of file
+
+    saveActivity(input: ActivityInput!): Activity
+
+    deleteActivity(id: ID!): Boolean
+    updateActivityState(id: ID!, state: Int!): Boolean
+
+}
+
+
+
+type Activity {
+
+    id: ID
+
+    pid: ID
+
+    path: String
+
+    name: String
+
+    description: String
+
+    signupDeadline: String
+
+    matchTime: String
+
+    address: String
+
+    ratingSchemeId: ID
+
+    ratingScheme: RatingSchemeResponse
+
+    playerCount: Int
+
+    playerMax: Int
+
+    sortOrder: Int
+
+    state: Int
+
+    stateName: String
+
+    createTime: String
+
+    updateTime: String
+
+    coverImage: MediaResponse
+
+    images: [MediaResponse]
+
+    videos: [MediaResponse]
+
+    stages: [Activity]
+
+    parent: Activity
+
+    judges: [ActivityJudgeResponse]
+
+}
+
+
+
+type PageResponse {
+
+    content: [Activity]
+
+    page: Int
+
+    size: Int
+
+    total: Int
+
+    totalPages: Int
+
+    totalElements: Int
+
+    number: Int
+
+    first: Boolean
+
+    last: Boolean
+
+}
+
+
+
+input ActivityInput {
+
+    id: ID
+
+    pid: ID
+
+    name: String!
+
+    description: String
+
+    signupDeadline: String
+
+    matchTime: String
+
+    address: String
+
+    ratingSchemeId: ID
+
+    playerMax: Int
+
+    sortOrder: Int
+
+    state: Int
+
+    stages: [ActivityStageInput]
+
+    judges: [ActivityJudgeInput]
+
+}
+
+
+
+input ActivityStageInput {
+
+    id: ID
+
+    name: String!
+
+    description: String
+
+    matchTime: String
+
+    address: String
+
+    ratingSchemeId: ID
+
+    playerMax: Int
+
+    sortOrder: Int
+
+    state: Int
+
+}
+
+
+
+input ActivityJudgeInput {
+
+    judgeId: ID!
+
+    judgeName: String
+
+    stageIds: [ID]
+
+}
+
+
+
+type ActivityJudgeResponse {
+
+    id: ID
+
+    name: String
+
+    phone: String
+
+    description: String
+
+    stageIds: [ID]
+
+}
+
+
+
+# 濞茶濮╃拠锔藉剰閸滃瞼濮搁幀浣告惙鎼存梻琚崹瀣剁礄瀵邦喕淇婄粩顖欏▏閻㈩煉绱�
+
+type ActivityDetailAndStatusResponse {
+
+    activity: Activity
+
+    registrationStatus: String
+
+    canRegister: Boolean
+
+    playerRegistration: ActivityPlayer
+
+}
+
+
+
+# 娑撹濮欓弬鍦埠鐠佲�虫惙鎼存梻琚崹?
+
+type OrganizerStatsResponse {
+
+    activeActivities: Int!
+
+    totalParticipants: Int!
+
+    totalActivities: Int!
+
+}
+

--
Gitblit v1.8.0