Ver código fonte

update

master
dengbiao 2 semanas atrás
pai
commit
3e1d9eff99
4 arquivos alterados com 315 adições e 8 exclusões
  1. +8
    -8
      app/hdl/institutional_management/public_platoon/hdl_basic.go
  2. +115
    -0
      docs/docs.go
  3. +115
    -0
      docs/swagger.json
  4. +77
    -0
      docs/swagger.yaml

+ 8
- 8
app/hdl/institutional_management/public_platoon/hdl_basic.go Ver arquivo

@@ -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 "具体错误"


+ 115
- 0
docs/docs.go Ver arquivo

@@ -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": {


+ 115
- 0
docs/swagger.json Ver arquivo

@@ -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": {


+ 77
- 0
docs/swagger.yaml Ver arquivo

@@ -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


Carregando…
Cancelar
Salvar