{ "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "https" ], "swagger": "2.0", "info": { "version": "1.0" }, "basePath": "/", "paths": { "/api/v1/shops": { "get": { "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "获取店铺列表", "operationId": "shopListShops", "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 } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "owner", "name", "description", "rating", "totalOrders", "playerCount", "commissionType", "commissionValue", "announcements", "templateConfig" ], "properties": { "announcements": { "type": "array", "items": { "type": "string" } }, "banner": { "type": "string" }, "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "owner": { "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" } } } }, "playerCount": { "type": "integer" }, "rating": { "type": "string" }, "templateConfig": {}, "totalOrders": { "type": "integer" } } } }, "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": "shopCreateShop", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "required": [ "name", "description", "commissionType", "commissionValue" ], "properties": { "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "name": { "type": "string" } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "announcements": { "type": "array", "items": { "type": "string" } }, "banner": { "type": "string" }, "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "owner": { "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" } } } }, "playerCount": { "type": "integer" }, "rating": { "type": "string" }, "templateConfig": {}, "totalOrders": { "type": "integer" } } } } } } }, "/api/v1/shops/invitations/{id}": { "delete": { "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "拒绝邀请", "operationId": "shopRejectInvitation", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "", "schema": { "type": "object" } } } } }, "/api/v1/shops/invitations/{id}/accept": { "post": { "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "接受邀请", "operationId": "shopAcceptInvitation", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "", "schema": { "type": "object" } } } } }, "/api/v1/shops/mine": { "get": { "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "获取当前用户的店铺", "operationId": "shopGetMyShop", "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "announcements": { "type": "array", "items": { "type": "string" } }, "banner": { "type": "string" }, "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "owner": { "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" } } } }, "playerCount": { "type": "integer" }, "rating": { "type": "string" }, "templateConfig": {}, "totalOrders": { "type": "integer" } } } } } } }, "/api/v1/shops/{id}": { "get": { "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "获取店铺详情", "operationId": "shopGetShop", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "announcements": { "type": "array", "items": { "type": "string" } }, "banner": { "type": "string" }, "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "owner": { "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" } } } }, "playerCount": { "type": "integer" }, "rating": { "type": "string" }, "templateConfig": {}, "totalOrders": { "type": "integer" } } } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "更新店铺信息", "operationId": "shopUpdateShop", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "allowIndependentOrders": { "type": "boolean" }, "allowMultiShop": { "type": "boolean" }, "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "dispatchMode": { "type": "string" }, "name": { "type": "string" } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "announcements": { "type": "array", "items": { "type": "string" } }, "banner": { "type": "string" }, "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "owner": { "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" } } } }, "playerCount": { "type": "integer" }, "rating": { "type": "string" }, "templateConfig": {}, "totalOrders": { "type": "integer" } } } } } } }, "/api/v1/shops/{id}/announcements": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "新增店铺公告", "operationId": "shopAddAnnouncement", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string" } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object" } } } } }, "/api/v1/shops/{id}/announcements/{index}": { "delete": { "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "删除店铺公告", "operationId": "shopDeleteAnnouncement", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true }, { "type": "integer", "name": "index", "in": "path", "required": true } ], "responses": { "200": { "description": "", "schema": { "type": "object" } } } } }, "/api/v1/shops/{id}/income-stats": { "get": { "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "获取收入统计", "operationId": "shopGetShopIncomeStats", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "completedOrders": { "type": "integer" }, "monthlyIncome": { "type": "string" }, "pendingSettlement": { "type": "string" }, "totalOrders": { "type": "integer" }, "totalWithdrawn": { "type": "string" } } } } } } }, "/api/v1/shops/{id}/invitations": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "邀请打手", "operationId": "shopInvitePlayer", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "required": [ "playerId" ], "properties": { "playerId": { "type": "integer" } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object" } } } } }, "/api/v1/shops/{id}/players/{playerId}": { "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "移除打手", "operationId": "shopRemovePlayer", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "required": [ "playerId" ], "properties": { "playerId": { "type": "integer" } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object" } } } } }, "/api/v1/shops/{id}/template": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "更新店铺模板", "operationId": "shopUpdateShopTemplate", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "required": [ "sections" ], "properties": { "sections": { "type": "string" } } } } ], "responses": { "200": { "description": "", "schema": { "type": "object" } } } } }, "/api/v1/users/{id}/shop": { "get": { "produces": [ "application/json" ], "schemes": [ "https" ], "summary": "获取店长的店铺", "operationId": "shopGetUserShop", "parameters": [ { "type": "integer", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "", "schema": { "type": "object", "properties": { "announcements": { "type": "array", "items": { "type": "string" } }, "banner": { "type": "string" }, "commissionType": { "type": "string" }, "commissionValue": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "owner": { "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" } } } }, "playerCount": { "type": "integer" }, "rating": { "type": "string" }, "templateConfig": {}, "totalOrders": { "type": "integer" } } } } } } } }, "x-date": "2026-04-22 22:30:24", "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" }