889 lines
24 KiB
JSON
889 lines
24 KiB
JSON
{
|
|
"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,
|
|
"example": 0,
|
|
"name": "offset",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 20,
|
|
"example": 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",
|
|
"playerId",
|
|
"service",
|
|
"status",
|
|
"totalPrice",
|
|
"createdAt"
|
|
],
|
|
"properties": {
|
|
"acceptedAt": {
|
|
"type": "string"
|
|
},
|
|
"completedAt": {
|
|
"type": "string"
|
|
},
|
|
"consumerId": {
|
|
"type": "integer"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"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"
|
|
},
|
|
"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",
|
|
"playerId",
|
|
"service",
|
|
"status",
|
|
"totalPrice",
|
|
"createdAt"
|
|
],
|
|
"properties": {
|
|
"acceptedAt": {
|
|
"type": "string"
|
|
},
|
|
"completedAt": {
|
|
"type": "string"
|
|
},
|
|
"consumerId": {
|
|
"type": "integer"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"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"
|
|
},
|
|
"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",
|
|
"playerId",
|
|
"service",
|
|
"status",
|
|
"totalPrice",
|
|
"createdAt"
|
|
],
|
|
"properties": {
|
|
"acceptedAt": {
|
|
"type": "string"
|
|
},
|
|
"completedAt": {
|
|
"type": "string"
|
|
},
|
|
"consumerId": {
|
|
"type": "integer"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"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"
|
|
},
|
|
"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"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"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"
|
|
},
|
|
"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",
|
|
"playerId",
|
|
"service",
|
|
"status",
|
|
"totalPrice",
|
|
"createdAt"
|
|
],
|
|
"properties": {
|
|
"acceptedAt": {
|
|
"type": "string"
|
|
},
|
|
"completedAt": {
|
|
"type": "string"
|
|
},
|
|
"consumerId": {
|
|
"type": "integer"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"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"
|
|
},
|
|
"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-04-22 22:30:23",
|
|
"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.10.1"
|
|
} |