From 9f8395fab13ca4b230a0f7d62636e209745c91d4 Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期日, 28 九月 2025 14:16:18 +0800
Subject: [PATCH] feat: 完善注册流程的文件上传功能
---
backend/src/main/resources/graphql/media.graphqls | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/backend/src/main/resources/graphql/media.graphqls b/backend/src/main/resources/graphql/media.graphqls
index 97961f1..3b73a15 100644
--- a/backend/src/main/resources/graphql/media.graphqls
+++ b/backend/src/main/resources/graphql/media.graphqls
@@ -6,6 +6,15 @@
"鍒犻櫎濯掍綋鏂囦欢"
deleteMedia(id: ID!): Boolean
+
+ "淇濆瓨濯掍綋鏂囦欢锛堟柊鐗堟湰锛�"
+ saveMediaV2(input: MediaSaveInput!): MediaSaveResponse!
+
+ "淇濆瓨閫夋墜澶村儚"
+ savePlayerAvatar(playerId: ID!, url: String!, fileName: String, fileSize: Long): MediaSaveResponse!
+
+ "淇濆瓨娲诲姩鎶ュ悕闄勪欢"
+ saveActivityPlayerAttachment(activityPlayerId: ID!, url: String!, fileName: String, fileSize: Long, mediaType: Int!): MediaSaveResponse!
}
extend type Query {
@@ -79,4 +88,24 @@
"搴旂敤閰嶇疆"
type AppConfig {
mediaBaseUrl: String!
+}
+
+"濯掍綋淇濆瓨杈撳叆绫诲瀷锛堟柊鐗堟湰锛�"
+input MediaSaveInput {
+ targetType: String! # 鐩爣绫诲瀷锛歱layer, activity_player
+ targetId: ID! # 鐩爣ID
+ url: String! # COS鏂囦欢URL
+ thumbUrl: String # 缂╃暐鍥綰RL锛堝彲閫夛級
+ fileName: String # 鏂囦欢鍚�
+ fileExt: String # 鏂囦欢鎵╁睍鍚�
+ fileSize: Long # 鏂囦欢澶у皬锛堝瓧鑺傦級
+ duration: Int # 瑙嗛鏃堕暱锛堢锛岃棰戞枃浠朵笓鐢級
+ mediaType: Int! # 濯掍綋绫诲瀷锛�1-鍥剧墖锛�2-瑙嗛锛�3-闊抽锛�4-鏂囨。
+}
+
+"濯掍綋淇濆瓨鍝嶅簲绫诲瀷"
+type MediaSaveResponse {
+ success: Boolean!
+ message: String
+ mediaId: ID
}
\ No newline at end of file
--
Gitblit v1.8.0