From c4938f6f4e839890b032c75c7a57333a6a9157a9 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期四, 06 十一月 2025 17:06:10 +0800
Subject: [PATCH] 添加新闻功能
---
backend/src/main/resources/graphql/auth.graphqls | 91 ++++++++++++++++++++++++++++++++++-----------
1 files changed, 69 insertions(+), 22 deletions(-)
diff --git a/backend/src/main/resources/graphql/auth.graphqls b/backend/src/main/resources/graphql/auth.graphqls
index d067fea..7addfa7 100644
--- a/backend/src/main/resources/graphql/auth.graphqls
+++ b/backend/src/main/resources/graphql/auth.graphqls
@@ -1,53 +1,100 @@
-extend type Mutation {
- "Web绔敤鎴风櫥褰�"
- webLogin(input: LoginRequest): LoginResponse
+extend type Query {
+ # 璁よ瘉鐩稿叧鎺ュ彛宸茶縼绉诲埌RESTful API
+ _: Boolean
}
-"鐧诲綍璇锋眰"
+extend type Mutation {
+ # 寰俊鐧诲綍
+ wxLogin(input: WxLoginRequest!): WxLoginResponse
+
+ # Web绔櫥褰�
+ webLogin(input: LoginRequest!): LoginResponse
+
+ # 瑙e瘑寰俊鎵嬫満鍙凤紙鏃х増API锛�
+ decryptPhoneNumber(encryptedData: String!, iv: String!, sessionKey: String!): PhoneDecryptResponse
+
+ # 鑾峰彇寰俊鎵嬫満鍙凤紙鏂扮増API锛�
+ getPhoneNumberByCode(code: String!): PhoneDecryptResponse
+}
+
input LoginRequest {
phone: String!
password: String!
}
-"鐧诲綍鍝嶅簲"
-type LoginResponse {
- token: String!
- userInfo: UserInfo!
+input WxLoginRequest {
+ code: String
+ wxOpenid: String
+ wxUnionid: String
+ phone: String
+ loginIp: String
+ deviceInfo: String
+ phoneAuthorized: Boolean
+ sessionKey: String
}
-"鐢ㄦ埛淇℃伅"
+type LoginResponse {
+ token: String
+ userInfo: UserInfo
+}
+
+type WxLoginResponse {
+ token: String
+ userInfo: UserInfo
+ isNewUser: Boolean
+ loginRecordId: Long
+ sessionKey: String
+ success: Boolean
+ message: String
+ hasEmployee: Boolean
+ hasJudge: Boolean
+ hasPlayer: Boolean
+}
+
type UserInfo {
- userId: ID!
- name: String!
- phone: String!
- userType: String!
+ userId: Long
+ name: String
+ phone: String
+ userType: String
+ avatarUrl: String
employee: EmployeeInfo
judge: JudgeInfo
player: PlayerInfo
}
-"鍛樺伐淇℃伅"
type EmployeeInfo {
- id: ID!
- name: String!
- roleId: String!
+ id: Long
+ name: String
+ roleId: String
description: String
}
-"璇勫淇℃伅"
type JudgeInfo {
- id: ID!
- name: String!
+ id: Long
+ name: String
title: String
company: String
description: String
}
-"瀛﹀憳淇℃伅"
type PlayerInfo {
id: ID!
name: String!
phone: String
description: String
- auditState: Int
+ userInfo: PlayerUserInfo
+}
+
+type PlayerUserInfo {
+ userId: Long
+ name: String
+ phone: String
+ avatarUrl: String
+ avatar: MediaInfo
+}
+
+type PhoneDecryptResponse {
+ phoneNumber: String
+ purePhoneNumber: String
+ countryCode: String
}
\ No newline at end of file
--
Gitblit v1.8.0