fix: some api bug
This commit is contained in:
@@ -0,0 +1,214 @@
|
||||
{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "game-api",
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/games": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取游戏列表",
|
||||
"operationId": "gameListGames",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"name",
|
||||
"icon",
|
||||
"category"
|
||||
],
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "创建游戏",
|
||||
"operationId": "gameCreateGame",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"name",
|
||||
"icon",
|
||||
"category"
|
||||
],
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/games/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取游戏详情",
|
||||
"operationId": "gameGetGame",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"icon": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-03-23 01:44:01",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.9.2"
|
||||
}
|
||||
@@ -0,0 +1,940 @@
|
||||
{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "聚玩订单服务",
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/orders": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取订单列表",
|
||||
"operationId": "orderListOrders",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "consumer, player, owner",
|
||||
"name": "role",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "status",
|
||||
"in": "query",
|
||||
"allowEmptyValue": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"consumerId",
|
||||
"consumerName",
|
||||
"playerId",
|
||||
"playerName",
|
||||
"service",
|
||||
"status",
|
||||
"totalPrice",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"acceptedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"completedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"consumerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"consumerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shopId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shopName": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"totalPrice": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "创建订单",
|
||||
"operationId": "orderCreateOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"playerId",
|
||||
"serviceId",
|
||||
"quantity"
|
||||
],
|
||||
"properties": {
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer"
|
||||
},
|
||||
"serviceId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shopId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"order": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"consumerId",
|
||||
"consumerName",
|
||||
"playerId",
|
||||
"playerName",
|
||||
"service",
|
||||
"status",
|
||||
"totalPrice",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"acceptedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"completedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"consumerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"consumerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shopId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shopName": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"totalPrice": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/paid": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "创建并支付订单",
|
||||
"operationId": "orderCreateAndPayOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"playerId",
|
||||
"serviceId",
|
||||
"quantity"
|
||||
],
|
||||
"properties": {
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"quantity": {
|
||||
"type": "integer"
|
||||
},
|
||||
"serviceId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shopId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"order": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"consumerId",
|
||||
"consumerName",
|
||||
"playerId",
|
||||
"playerName",
|
||||
"service",
|
||||
"status",
|
||||
"totalPrice",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"acceptedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"completedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"consumerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"consumerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shopId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shopName": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"totalPrice": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取订单详情",
|
||||
"operationId": "orderGetOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"acceptedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"completedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"consumerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"consumerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shopId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shopName": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"totalPrice": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/accept": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "接单",
|
||||
"operationId": "orderAcceptOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/cancel": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "取消订单",
|
||||
"operationId": "orderCancelOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/confirm-close": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "确认结算",
|
||||
"operationId": "orderConfirmCloseOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/pay": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "支付订单",
|
||||
"operationId": "orderPayOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/reorder": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "再来一单",
|
||||
"operationId": "orderReorder",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"order": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"consumerId",
|
||||
"consumerName",
|
||||
"playerId",
|
||||
"playerName",
|
||||
"service",
|
||||
"status",
|
||||
"totalPrice",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"acceptedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"completedAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"consumerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"consumerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"playerName": {
|
||||
"type": "string"
|
||||
},
|
||||
"service": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"shopId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"shopName": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"totalPrice": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/orders/{id}/request-close": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "申请结算",
|
||||
"operationId": "orderRequestCloseOrder",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-03-27 17:39:38",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.9.2"
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "文件服务",
|
||||
"version": "v1"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/files/{fileId}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "文件获取接口 (如果是私有文件,通过此接口获取或重定向)",
|
||||
"operationId": "fileGetFile",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "fileId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/upload": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "文件上传接口",
|
||||
"operationId": "fileUpload",
|
||||
"parameters": [
|
||||
{
|
||||
"enum": [
|
||||
"avatar",
|
||||
"chat",
|
||||
"post",
|
||||
"verification",
|
||||
"dispute"
|
||||
],
|
||||
"type": "string",
|
||||
"description": "文件类型限制",
|
||||
"name": "type",
|
||||
"in": "formData",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "返回 CDN 地址或访问地址",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-03-26 17:05:36",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.9.2"
|
||||
}
|
||||
@@ -0,0 +1,978 @@
|
||||
{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "聚玩打手服务",
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/players": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取打手列表",
|
||||
"operationId": "playerListPlayers",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "gameId",
|
||||
"in": "query",
|
||||
"allowEmptyValue": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "gender",
|
||||
"in": "query",
|
||||
"allowEmptyValue": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"user",
|
||||
"rating",
|
||||
"totalOrders",
|
||||
"completionRate",
|
||||
"status",
|
||||
"games",
|
||||
"services",
|
||||
"tags"
|
||||
],
|
||||
"properties": {
|
||||
"completionRate": {
|
||||
"type": "number"
|
||||
},
|
||||
"games": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"rating": {
|
||||
"type": "number"
|
||||
},
|
||||
"services": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"shopId": {
|
||||
"type": "string"
|
||||
},
|
||||
"shopName": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"totalOrders": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"description": "consumer, player, owner, admin",
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/players/me/status": {
|
||||
"put": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "更新接单状态",
|
||||
"operationId": "playerUpdatePlayerStatus",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/players/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取打手详情",
|
||||
"operationId": "playerGetPlayer",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"completionRate": {
|
||||
"type": "number"
|
||||
},
|
||||
"games": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"rating": {
|
||||
"type": "number"
|
||||
},
|
||||
"services": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"shopId": {
|
||||
"type": "string"
|
||||
},
|
||||
"shopName": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"totalOrders": {
|
||||
"type": "integer"
|
||||
},
|
||||
"user": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
"nickname",
|
||||
"avatar",
|
||||
"role",
|
||||
"verifiedRoles",
|
||||
"verificationStatus",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"avatar": {
|
||||
"type": "string"
|
||||
},
|
||||
"bio": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"description": "consumer, player, owner, admin",
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"verificationStatus": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"verifiedRoles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/players/{id}/services": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取指定打手的服务列表",
|
||||
"operationId": "playerListPlayerServices",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/services": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取所有服务列表",
|
||||
"operationId": "playerListServices",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"playerId",
|
||||
"gameId",
|
||||
"gameName",
|
||||
"title",
|
||||
"description",
|
||||
"price",
|
||||
"unit",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "创建服务",
|
||||
"operationId": "playerCreateService",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"gameId",
|
||||
"price",
|
||||
"unit"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/services/{id}": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取服务详情",
|
||||
"operationId": "playerGetService",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "更新服务",
|
||||
"operationId": "playerUpdateService",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"gameId",
|
||||
"availability"
|
||||
],
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"availability": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"gameId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"gameName": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"playerId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"price": {
|
||||
"type": "number"
|
||||
},
|
||||
"rankRange": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"unit": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"consumes": [
|
||||
"application/x-www-form-urlencoded"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "删除服务",
|
||||
"operationId": "playerDeleteService",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-03-29 23:48:43",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.9.2"
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "钱包服务",
|
||||
"version": "1.0"
|
||||
},
|
||||
"basePath": "/",
|
||||
"paths": {
|
||||
"/api/v1/wallet/balance": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取余额",
|
||||
"operationId": "walletGetBalance",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"balance": {
|
||||
"type": "string"
|
||||
},
|
||||
"frozenBalance": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/wallet/topup": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "充值",
|
||||
"operationId": "walletTopup",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"method"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"method": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/wallet/transactions": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "获取流水",
|
||||
"operationId": "walletListTransactions",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"name": "offset",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"type",
|
||||
"amount",
|
||||
"description",
|
||||
"createdAt"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"orderId": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"meta": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"total",
|
||||
"offset",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"limit": {
|
||||
"type": "integer"
|
||||
},
|
||||
"offset": {
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/wallet/withdraw": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"schemes": [
|
||||
"https"
|
||||
],
|
||||
"summary": "提现",
|
||||
"operationId": "walletWithdraw",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"method"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "string"
|
||||
},
|
||||
"method": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-date": "2026-03-26 17:02:28",
|
||||
"x-description": "This is a goctl generated swagger file.",
|
||||
"x-github": "https://github.com/zeromicro/go-zero",
|
||||
"x-go-zero-doc": "https://go-zero.dev/",
|
||||
"x-goctl-version": "1.9.2"
|
||||
}
|
||||
@@ -30,5 +30,9 @@ service game-api {
|
||||
@doc "获取游戏详情"
|
||||
@handler GetGame
|
||||
get /:id (GetGameReq) returns (Game)
|
||||
|
||||
@doc "创建游戏"
|
||||
@handler CreateGame
|
||||
post / (Game) returns (Game)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ type (
|
||||
}
|
||||
// 获取文件请求(用于私有文件或代理访问)
|
||||
GetFileReq {
|
||||
FileId string `path:"fileId"`
|
||||
FileId string `form:"key"`
|
||||
}
|
||||
)
|
||||
|
||||
@@ -34,6 +34,6 @@ service file-api {
|
||||
|
||||
@doc "文件获取接口 (如果是私有文件,通过此接口获取或重定向)"
|
||||
@handler GetFile
|
||||
get /files/:fileId (GetFileReq)
|
||||
get /files (GetFileReq)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
syntax = "v1"
|
||||
import "common.api"
|
||||
|
||||
info (
|
||||
title: "聚玩订单服务"
|
||||
desc: "处理订单业务"
|
||||
author: "Asadz"
|
||||
version: "1.0"
|
||||
)
|
||||
|
||||
type (
|
||||
PathId {
|
||||
Id int64 `path:"id"`
|
||||
}
|
||||
PlayerService {
|
||||
Id int64 `json:"id"`
|
||||
PlayerId int64 `json:"playerId"`
|
||||
GameId int64 `json:"gameId"`
|
||||
GameName string `json:"gameName"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Price float64 `json:"price"`
|
||||
Unit string `json:"unit"`
|
||||
RankRange string `json:"rankRange,optional"`
|
||||
Availability []string `json:"availability"`
|
||||
}
|
||||
Order {
|
||||
Id int64 `json:"id"`
|
||||
ConsumerId int64 `json:"consumerId"`
|
||||
|
||||
+9
-1
@@ -1,5 +1,12 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "聚玩打手服务"
|
||||
desc: "聚玩用户服务处理打手信息管理、服务发布及订单相关接口"
|
||||
author: "Asadz"
|
||||
version: "1.0"
|
||||
)
|
||||
|
||||
import "common.api"
|
||||
|
||||
type (
|
||||
@@ -50,12 +57,13 @@ type (
|
||||
Services []PlayerService `json:"services"`
|
||||
ShopId string `json:"shopId,optional"`
|
||||
ShopName string `json:"shopName,optional"`
|
||||
Gender bool `json:"gender"`
|
||||
Tags []string `json:"tags"`
|
||||
}
|
||||
PlayerListReq {
|
||||
PageReq
|
||||
GameId int64 `form:"gameId,optional"`
|
||||
Gender int `form:"gender,optional"`
|
||||
Gender int64 `form:"gender,optional"`
|
||||
}
|
||||
PlayerListResp {
|
||||
Items []PlayerProfile `json:"items"`
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ service shop-api {
|
||||
|
||||
@doc "更新店铺信息"
|
||||
@handler UpdateShop
|
||||
put /shops/:id (ShopIdReq) returns (ShopProfile)
|
||||
put /shops/:id (UpdateShopReq) returns (ShopProfile)
|
||||
|
||||
@doc "更新店铺模板"
|
||||
@handler UpdateShopTemplate
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "聚玩认证审核服务"
|
||||
desc: "处理用户角色认证申请(打手/店长)及管理员审核流程"
|
||||
author: "Asadz"
|
||||
version: "1.0"
|
||||
)
|
||||
|
||||
// =================================================================================
|
||||
// 数据结构定义 (Data Structures)
|
||||
// =================================================================================
|
||||
|
||||
// =================================================================================
|
||||
// 用户端接口 (User Side)
|
||||
// 路径前缀: /api/v1/users
|
||||
// =================================================================================
|
||||
@server (
|
||||
group: verification_user
|
||||
prefix: /api/v1/users
|
||||
)
|
||||
service verification-api {
|
||||
@doc "提交或修改角色认证申请 (支持幂等更新)"
|
||||
@handler ApplyVerification
|
||||
post /me/verification (ApplyVerificationReq) returns (VerificationEmptyResp)
|
||||
|
||||
@doc "获取我的所有认证状态"
|
||||
@handler GetMyVerifications
|
||||
get /me/verification returns (GetMyVerificationsResp)
|
||||
}
|
||||
|
||||
// =================================================================================
|
||||
// 管理端接口 (Admin Side)
|
||||
// 路径前缀: /api/v1/admin
|
||||
// =================================================================================
|
||||
@server (
|
||||
group: verification_admin
|
||||
prefix: /api/v1/admin
|
||||
)
|
||||
service verification-api {
|
||||
@doc "管理员获取认证申请列表 (分页)"
|
||||
@handler GetVerifications
|
||||
get /verifications (GetPendingListReq) returns (GetPendingListResp)
|
||||
|
||||
@doc "管理员通过申请"
|
||||
@handler ApproveVerification
|
||||
post /verifications/:id/approve (VerificationIdReq) returns (VerificationEmptyResp)
|
||||
|
||||
@doc "管理员驳回申请"
|
||||
@handler RejectVerification
|
||||
post /verifications/:id/reject (RejectVerificationReq) returns (VerificationEmptyResp)
|
||||
}
|
||||
|
||||
//syntax = "v1"
|
||||
//
|
||||
//info (
|
||||
// title: "聚玩认证审核服务"
|
||||
// desc: "处理用户角色认证申请(打手/店长)及管理员审核流程"
|
||||
// author: "Asadz"
|
||||
// version: "1.0"
|
||||
//)
|
||||
//
|
||||
//// =================================================================================
|
||||
//// 数据结构定义 (Data Structures)
|
||||
//// =================================================================================
|
||||
//
|
||||
//// =================================================================================
|
||||
//// 用户端接口 (User Side)
|
||||
//// 路径前缀: /api/v1/users
|
||||
//// =================================================================================
|
||||
//@server (
|
||||
// group: verification_user
|
||||
// prefix: /api/v1/users
|
||||
//)
|
||||
//service verification-api {
|
||||
// @doc "提交或修改角色认证申请 (支持幂等更新)"
|
||||
// @handler ApplyVerification
|
||||
// post /me/verification (ApplyVerificationReq) returns (VerificationEmptyResp)
|
||||
//
|
||||
// @doc "获取我的所有认证状态"
|
||||
// @handler GetMyVerifications
|
||||
// get /me/verification returns (GetMyVerificationsResp)
|
||||
//}
|
||||
//
|
||||
//// =================================================================================
|
||||
//// 管理端接口 (Admin Side)
|
||||
//// 路径前缀: /api/v1/admin
|
||||
//// =================================================================================
|
||||
//@server (
|
||||
// group: verification_admin
|
||||
// prefix: /api/v1/admin
|
||||
//)
|
||||
//service verification-api {
|
||||
// @doc "管理员获取认证申请列表 (分页)"
|
||||
// @handler GetVerifications
|
||||
// get /verifications (GetPendingListReq) returns (GetPendingListResp)
|
||||
//
|
||||
// @doc "管理员通过申请"
|
||||
// @handler ApproveVerification
|
||||
// post /verifications/:id/approve (VerificationIdReq) returns (VerificationEmptyResp)
|
||||
//
|
||||
// @doc "管理员驳回申请"
|
||||
// @handler RejectVerification
|
||||
// post /verifications/:id/reject (RejectVerificationReq) returns (VerificationEmptyResp)
|
||||
//}
|
||||
//
|
||||
|
||||
+11
-5
@@ -8,6 +8,13 @@ info (
|
||||
)
|
||||
|
||||
type (
|
||||
// 认证材料结构体(示例,实际根据需求定义)
|
||||
MaterialJson {
|
||||
IdCardFront string `json:"idCardFront"` // 身份证正面照片URL
|
||||
IdCardBack string `json:"idCardBack"` // 身份证反面照片URL
|
||||
GameScreenshots []*string `json:"gameScreenshots,optional"` // 游戏截图URL列表
|
||||
VoiceDemo *string `json:"voiceDemo,optional"` // 语音认证示例URL
|
||||
}
|
||||
// 认证记录展示对象
|
||||
// 对应数据库 user_verifications 表
|
||||
VerificationItem {
|
||||
@@ -23,8 +30,8 @@ type (
|
||||
}
|
||||
// 提交申请请求
|
||||
ApplyVerificationReq {
|
||||
Role string `json:"role"` // 申请什么角色
|
||||
Materials map[string]string `json:"materials"` // 证明材料键值对 {"idCardFront": "http...", "license": "http..."}
|
||||
Role string `json:"role"` // 申请什么角色
|
||||
Materials MaterialJson `json:"materials"` // 证明材料键值对 {"idCardFront": "http...", "license": "http..."}
|
||||
}
|
||||
// 获取我的申请记录响应
|
||||
GetMyVerificationsResp {
|
||||
@@ -235,9 +242,8 @@ service user-api {
|
||||
}
|
||||
|
||||
@server (
|
||||
group: verification_user
|
||||
prefix: /api/v1/users
|
||||
middleware: Logger // 必须登录
|
||||
group: verification_user
|
||||
prefix: /api/v1/users
|
||||
)
|
||||
service user-api {
|
||||
@doc "提交或修改角色认证申请 (支持幂等更新)"
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "钱包服务"
|
||||
desc: "处理钱包充值相关"
|
||||
author: "Asadz"
|
||||
version: "1.0"
|
||||
)
|
||||
|
||||
import "common.api"
|
||||
|
||||
type (
|
||||
|
||||
Reference in New Issue
Block a user