From d89f811230341778e7084294a458a7669844e932 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Mon, 11 Nov 2024 11:30:10 +0800 Subject: [PATCH] update --- .../public_platoon/md_public_platoon.go | 12 ++++++------ docs/docs.go | 12 +++++++++--- docs/swagger.json | 12 +++++++++--- docs/swagger.yaml | 6 ++++++ 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/app/md/institutional_management/public_platoon/md_public_platoon.go b/app/md/institutional_management/public_platoon/md_public_platoon.go index 4a352fe..a9fcd2e 100644 --- a/app/md/institutional_management/public_platoon/md_public_platoon.go +++ b/app/md/institutional_management/public_platoon/md_public_platoon.go @@ -21,18 +21,18 @@ type UpdatePublicPlatoonBasicReq struct { } type ExchangeUserPositionReq struct { - Position1 int64 `json:"position_1,required"` - Position2 int64 `json:"position_2,required"` + Position1 int64 `json:"position_1,required"` //位置1,具体值取返回数据中的 system_id + Position2 int64 `json:"position_2,required"` //位置2,具体值取返回数据中的 system_id } type TreeNode struct { - AvatarURL string `json:"avatar_url"` - Phone string `json:"phone"` - Nickname string `json:"nickname"` + AvatarURL string `json:"avatar_url" example:"头像"` + Phone string `json:"phone" example:"手机号"` + Nickname string `json:"nickname" example:"昵称"` Uid int64 `json:"uid"` PID int64 `json:"pid"` Position int64 `json:"position"` - SystemID int64 `json:"system_id"` + SystemID int64 `json:"system_id"` //公排网中id Level int `json:"level"` Son []*TreeNode `json:"son"` } diff --git a/docs/docs.go b/docs/docs.go index e5ac44f..01b4293 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -601,9 +601,11 @@ const docTemplate = `{ "type": "object", "properties": { "position_1": { + "description": "位置1,具体值取返回数据中的 system_id", "type": "integer" }, "position_2": { + "description": "位置2,具体值取返回数据中的 system_id", "type": "integer" } } @@ -739,16 +741,19 @@ const docTemplate = `{ "type": "object", "properties": { "avatar_url": { - "type": "string" + "type": "string", + "example": "头像" }, "level": { "type": "integer" }, "nickname": { - "type": "string" + "type": "string", + "example": "昵称" }, "phone": { - "type": "string" + "type": "string", + "example": "手机号" }, "pid": { "type": "integer" @@ -763,6 +768,7 @@ const docTemplate = `{ } }, "system_id": { + "description": "公排网中id", "type": "integer" }, "uid": { diff --git a/docs/swagger.json b/docs/swagger.json index ffb103d..f7611d8 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -594,9 +594,11 @@ "type": "object", "properties": { "position_1": { + "description": "位置1,具体值取返回数据中的 system_id", "type": "integer" }, "position_2": { + "description": "位置2,具体值取返回数据中的 system_id", "type": "integer" } } @@ -732,16 +734,19 @@ "type": "object", "properties": { "avatar_url": { - "type": "string" + "type": "string", + "example": "头像" }, "level": { "type": "integer" }, "nickname": { - "type": "string" + "type": "string", + "example": "昵称" }, "phone": { - "type": "string" + "type": "string", + "example": "手机号" }, "pid": { "type": "integer" @@ -756,6 +761,7 @@ } }, "system_id": { + "description": "公排网中id", "type": "integer" }, "uid": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 595683c..a0dc0bd 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -21,8 +21,10 @@ definitions: md.ExchangeUserPositionReq: properties: position_1: + description: 位置1,具体值取返回数据中的 system_id type: integer position_2: + description: 位置2,具体值取返回数据中的 system_id type: integer type: object md.FreePublishUserNode: @@ -112,12 +114,15 @@ definitions: md.TreeNode: properties: avatar_url: + example: 头像 type: string level: type: integer nickname: + example: 昵称 type: string phone: + example: 手机号 type: string pid: type: integer @@ -128,6 +133,7 @@ definitions: $ref: '#/definitions/md.TreeNode' type: array system_id: + description: 公排网中id type: integer uid: type: integer