From 3e1d9eff99a02a8db7e33d8d39ddf557ab0474ac Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 7 Nov 2024 19:03:47 +0800 Subject: [PATCH] update --- .../public_platoon/hdl_basic.go | 16 +-- docs/docs.go | 115 ++++++++++++++++++ docs/swagger.json | 115 ++++++++++++++++++ docs/swagger.yaml | 77 ++++++++++++ 4 files changed, 315 insertions(+), 8 deletions(-) diff --git a/app/hdl/institutional_management/public_platoon/hdl_basic.go b/app/hdl/institutional_management/public_platoon/hdl_basic.go index de831ab..19d1d6f 100644 --- a/app/hdl/institutional_management/public_platoon/hdl_basic.go +++ b/app/hdl/institutional_management/public_platoon/hdl_basic.go @@ -9,12 +9,12 @@ import ( ) // GetPublicPlatoonBasic -// @Summary 获取公排设置 -// @Tags 公排相关接口 -// @Description 获取公排设置 +// @Summary 制度中心-公排管理-公排基础设置(获取) +// @Tags 公排管理 +// @Description 公排基础设置(获取) // @Accept json // @Produce json -// @Param Authorization header +// @param Authorization header string true "验证参数Bearer和token空格拼接" // @Success 200 {object} map[string]interface{} "用户数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/publicPlatoon/getBasic [get] @@ -29,12 +29,12 @@ func GetPublicPlatoonBasic(c *gin.Context) { } // UpdatePublicPlatoonBasic -// @Summary 更改公排设置 -// @Tags 公排相关接口 -// @Description 更改公排设置 +// @Summary 制度中心-公排管理-公排基础设置(修改) +// @Tags 公排管理 +// @Description 公排基础设置(修改) // @Accept json // @Produce json -// @Param Authorization header +// @param Authorization header string true "验证参数Bearer和token空格拼接" // @Param req body interface{} true "公排设置表单内容" // @Success 200 {object} map[string]interface{} "修改数据条数" // @Failure 400 {object} md.Response "具体错误" diff --git a/docs/docs.go b/docs/docs.go index 443be5d..ad32c86 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -62,9 +62,124 @@ const docTemplate = `{ } } } + }, + "/api/login": { + "post": { + "description": "登入", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "登陆", + "parameters": [ + { + "description": "用户名密码", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.LoginReq" + } + } + ], + "responses": { + "200": { + "description": "token", + "schema": { + "$ref": "#/definitions/md.LoginResponse" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/publicPlatoon/getBasic": { + "get": { + "description": "公排基础设置(修改)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "公排管理" + ], + "summary": "制度中心-公排管理-公排基础设置(修改)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "公排设置表单内容", + "name": "req", + "in": "body", + "required": true, + "schema": {} + } + ], + "responses": { + "200": { + "description": "修改数据条数", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } } }, "definitions": { + "md.LoginReq": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "code": { + "type": "string", + "example": "验证码" + }, + "password": { + "type": "string", + "example": "登录密码" + }, + "username": { + "type": "string", + "example": "登录账号" + } + } + }, + "md.LoginResponse": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + }, "md.Response": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index c6efd53..879222f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -55,9 +55,124 @@ } } } + }, + "/api/login": { + "post": { + "description": "登入", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "登录" + ], + "summary": "登陆", + "parameters": [ + { + "description": "用户名密码", + "name": "req", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.LoginReq" + } + } + ], + "responses": { + "200": { + "description": "token", + "schema": { + "$ref": "#/definitions/md.LoginResponse" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/publicPlatoon/getBasic": { + "get": { + "description": "公排基础设置(修改)", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "公排管理" + ], + "summary": "制度中心-公排管理-公排基础设置(修改)", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + }, + { + "description": "公排设置表单内容", + "name": "req", + "in": "body", + "required": true, + "schema": {} + } + ], + "responses": { + "200": { + "description": "修改数据条数", + "schema": { + "type": "object", + "additionalProperties": true + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } } }, "definitions": { + "md.LoginReq": { + "type": "object", + "required": [ + "password", + "username" + ], + "properties": { + "code": { + "type": "string", + "example": "验证码" + }, + "password": { + "type": "string", + "example": "登录密码" + }, + "username": { + "type": "string", + "example": "登录账号" + } + } + }, + "md.LoginResponse": { + "type": "object", + "properties": { + "token": { + "type": "string" + } + } + }, "md.Response": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index ddc70c9..7ae7cf6 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,4 +1,24 @@ definitions: + md.LoginReq: + properties: + code: + example: 验证码 + type: string + password: + example: 登录密码 + type: string + username: + example: 登录账号 + type: string + required: + - password + - username + type: object + md.LoginResponse: + properties: + token: + type: string + type: object md.Response: properties: code: @@ -50,6 +70,63 @@ paths: summary: Demo测试 tags: - Demo + /api/login: + post: + consumes: + - application/json + description: 登入 + parameters: + - description: 用户名密码 + in: body + name: req + required: true + schema: + $ref: '#/definitions/md.LoginReq' + produces: + - application/json + responses: + "200": + description: token + schema: + $ref: '#/definitions/md.LoginResponse' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 登陆 + tags: + - 登录 + /api/publicPlatoon/getBasic: + get: + consumes: + - application/json + description: 公排基础设置(修改) + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + - description: 公排设置表单内容 + in: body + name: req + required: true + schema: {} + produces: + - application/json + responses: + "200": + description: 修改数据条数 + schema: + additionalProperties: true + type: object + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 制度中心-公排管理-公排基础设置(修改) + tags: + - 公排管理 securityDefinitions: MasterID: in: header