Browse Source

文档

master
huangjiajun 4 weeks ago
parent
commit
1f754af4cf
5 changed files with 1462 additions and 67 deletions
  1. +2
    -2
      app/hdl/hdl_login.go
  2. +1
    -1
      app/hdl/hdl_role.go
  3. +544
    -22
      docs/docs.go
  4. +544
    -22
      docs/swagger.json
  5. +371
    -20
      docs/swagger.yaml

+ 2
- 2
app/hdl/hdl_login.go View File

@@ -72,7 +72,7 @@ func Login(c *gin.Context) {
// @Param req body md.LoginPhoneReq true "用户名、验证码" // @Param req body md.LoginPhoneReq true "用户名、验证码"
// @Success 200 {object} md.LoginResponse "token" // @Success 200 {object} md.LoginResponse "token"
// @Failure 400 {object} md.Response "具体错误" // @Failure 400 {object} md.Response "具体错误"
// @Router /api/login [post]
// @Router /api/login/phone [post]
func LoginPhone(c *gin.Context) { func LoginPhone(c *gin.Context) {
var req md.LoginPhoneReq var req md.LoginPhoneReq
err := c.ShouldBindJSON(&req) err := c.ShouldBindJSON(&req)
@@ -120,7 +120,7 @@ func LoginPhone(c *gin.Context) {
// @Param req body md.LoginReq true "用户名、验证码" // @Param req body md.LoginReq true "用户名、验证码"
// @Success 200 {object} md.LoginResponse "token" // @Success 200 {object} md.LoginResponse "token"
// @Failure 400 {object} md.Response "具体错误" // @Failure 400 {object} md.Response "具体错误"
// @Router /api/login [post]
// @Router /api/login/register [post]
func Register(c *gin.Context) { func Register(c *gin.Context) {
var req md.RegisterReq var req md.RegisterReq
err := c.ShouldBindJSON(&req) err := c.ShouldBindJSON(&req)


+ 1
- 1
app/hdl/hdl_role.go View File

@@ -281,7 +281,7 @@ func RoleBindPermissionGroup(c *gin.Context) {
// @Param args body md.UpdateRoleStateReq true "请求参数" // @Param args body md.UpdateRoleStateReq true "请求参数"
// @Success 200 {string} "success" // @Success 200 {string} "success"
// @Failure 400 {object} md.Response "具体错误" // @Failure 400 {object} md.Response "具体错误"
// @Router /api/role/updateRole [POST]
// @Router /api/role/UpdateRoleState [POST]
func UpdateRoleState(c *gin.Context) { func UpdateRoleState(c *gin.Context) {
var req md.UpdateRoleStateReq var req md.UpdateRoleStateReq
err := c.ShouldBindJSON(&req) err := c.ShouldBindJSON(&req)


+ 544
- 22
docs/docs.go View File

@@ -25,9 +25,9 @@ const docTemplate = `{
"host": "{{.Host}}", "host": "{{.Host}}",
"basePath": "{{.BasePath}}", "basePath": "{{.BasePath}}",
"paths": { "paths": {
"/api/login": {
"post": {
"description": "登入",
"/api/account/base": {
"get": {
"description": "账号信息",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -35,25 +35,23 @@ const docTemplate = `{
"application/json" "application/json"
], ],
"tags": [ "tags": [
"ADMIN"
"账号中心------嘉俊"
], ],
"summary": "登陆",
"summary": "账号信息",
"parameters": [ "parameters": [
{ {
"description": "用户名密码",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.LoginReq"
}
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "token",
"description": "具体看返回内容",
"schema": { "schema": {
"$ref": "#/definitions/md.LoginResponse"
"$ref": "#/definitions/md.AccountBase"
} }
}, },
"400": { "400": {
@@ -65,7 +63,7 @@ const docTemplate = `{
} }
} }
}, },
"/api/qualification/bank/save": {
"/api/account/qualification/bank/save": {
"post": { "post": {
"description": "资质认证-银行资质保存", "description": "资质认证-银行资质保存",
"consumes": [ "consumes": [
@@ -112,7 +110,7 @@ const docTemplate = `{
} }
} }
}, },
"/api/qualification/contact/save": {
"/api/account/qualification/contact/save": {
"post": { "post": {
"description": "资质认证-联系方式保存", "description": "资质认证-联系方式保存",
"consumes": [ "consumes": [
@@ -159,7 +157,7 @@ const docTemplate = `{
} }
} }
}, },
"/api/qualification/enterprise/save": {
"/api/account/qualification/enterprise/save": {
"post": { "post": {
"description": "资质认证-企业认证保存", "description": "资质认证-企业认证保存",
"consumes": [ "consumes": [
@@ -206,7 +204,7 @@ const docTemplate = `{
} }
} }
}, },
"/api/qualification/info": {
"/api/account/qualification/info": {
"get": { "get": {
"description": "资质认证-基本信息", "description": "资质认证-基本信息",
"consumes": [ "consumes": [
@@ -244,7 +242,7 @@ const docTemplate = `{
} }
} }
}, },
"/api/qualification/select/base": {
"/api/account/qualification/select/base": {
"get": { "get": {
"description": "资质认证-认证下拉框选择内容", "description": "资质认证-认证下拉框选择内容",
"consumes": [ "consumes": [
@@ -282,6 +280,304 @@ const docTemplate = `{
} }
} }
}, },
"/api/account/update/password": {
"post": {
"description": "资质认证-企业认证保存",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"账号中心------嘉俊"
],
"summary": "企业认证保存",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.AccountUpdatePasswordReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login": {
"post": {
"description": "登入",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"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/login/phone": {
"post": {
"description": "手机号登入",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"summary": "手机号登陆",
"parameters": [
{
"description": "用户名、验证码",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.LoginPhoneReq"
}
}
],
"responses": {
"200": {
"description": "token",
"schema": {
"$ref": "#/definitions/md.LoginResponse"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login/register": {
"post": {
"description": "手机号注册",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"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/medium/list": {
"post": {
"description": "媒体中心-媒体列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"媒体中心------嘉俊"
],
"summary": "媒体列表",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "具体看返回内容 data里面的数据",
"schema": {
"$ref": "#/definitions/md.MediumListRes"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/qiniuyun/upload": {
"post": {
"description": "七牛云-七牛云上传",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"七牛云"
],
"summary": "七牛云上传",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header"
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.ImgReqUpload"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/role/UpdateRoleState": {
"post": {
"description": "修改角色状态",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN-权限管理"
],
"summary": "修改角色状态",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.UpdateRoleStateReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/role/addAdmin": { "/api/role/addAdmin": {
"post": { "post": {
"description": "新增管理员", "description": "新增管理员",
@@ -826,7 +1122,7 @@ const docTemplate = `{
}, },
"/api/role/updateRole": { "/api/role/updateRole": {
"post": { "post": {
"description": "修改角色状态",
"description": "修改角色",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -836,7 +1132,7 @@ const docTemplate = `{
"tags": [ "tags": [
"ADMIN-权限管理" "ADMIN-权限管理"
], ],
"summary": "修改角色状态",
"summary": "修改角色",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@@ -851,7 +1147,53 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/md.UpdateRoleStateReq"
"$ref": "#/definitions/md.UpdateRoleReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/sms": {
"post": {
"description": "短信-短信发送",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"短信"
],
"summary": "短信发送",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header"
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.SmsReq"
} }
} }
], ],
@@ -873,6 +1215,68 @@ const docTemplate = `{
} }
}, },
"definitions": { "definitions": {
"md.AccountBase": {
"type": "object",
"properties": {
"admin_phone": {
"type": "string",
"example": "管理员手机号"
},
"agent_id": {
"type": "string",
"example": "账户ID"
},
"company_abbreviation": {
"type": "string",
"example": "公司简称"
},
"company_name": {
"type": "string",
"example": "公司名称"
},
"contact_address": {
"type": "string",
"example": "联系地址"
},
"contact_email": {
"type": "string",
"example": "邮箱"
},
"contact_name": {
"type": "string",
"example": "联系人"
},
"contact_phone": {
"type": "string",
"example": "联系电话"
},
"country_region": {
"type": "string",
"example": "国家地区"
},
"currency_conf": {
"type": "string",
"example": "结算币种"
},
"nickname": {
"type": "string",
"example": "昵称"
}
}
},
"md.AccountUpdatePasswordReq": {
"type": "object",
"properties": {
"captcha": {
"type": "string",
"example": "验证码"
},
"password": {
"type": "string",
"example": "登录密码"
}
}
},
"md.AddAdminReq": { "md.AddAdminReq": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -1078,6 +1482,38 @@ const docTemplate = `{
} }
} }
}, },
"md.ImgReqUpload": {
"type": "object",
"properties": {
"dir": {
"type": "string"
},
"file_name": {
"type": "string"
},
"file_size": {
"description": "文件大小, 单位byte",
"type": "integer"
}
}
},
"md.LoginPhoneReq": {
"type": "object",
"required": [
"captcha",
"username"
],
"properties": {
"captcha": {
"type": "string",
"example": "验证码"
},
"username": {
"type": "string",
"example": "登录账号"
}
}
},
"md.LoginReq": { "md.LoginReq": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -1107,6 +1543,67 @@ const docTemplate = `{
} }
} }
}, },
"md.MediumListData": {
"type": "object",
"properties": {
"account": {
"type": "string",
"example": "媒体账号"
},
"business_license_address": {
"type": "string",
"example": "营业执照地址"
},
"company_name": {
"type": "string",
"example": "公司名称"
},
"id": {
"type": "string",
"example": "id"
},
"legal_representative": {
"type": "string",
"example": "法定代表人"
},
"medium_id": {
"type": "string",
"example": "媒体id"
},
"memo": {
"type": "string",
"example": "备注 审核时填写的"
},
"state": {
"type": "string",
"example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)"
},
"unified_social_credit_code": {
"type": "string",
"example": "统一社会信用代码"
}
}
},
"md.MediumListRes": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.MediumListData"
}
},
"state": {
"type": "array",
"items": {
"$ref": "#/definitions/md.SelectData"
}
},
"total": {
"type": "integer"
}
}
},
"md.Response": { "md.Response": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -1140,6 +1637,31 @@ const docTemplate = `{
} }
} }
}, },
"md.SelectData": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "名称"
},
"value": {
"type": "string",
"example": "值"
}
}
},
"md.SmsReq": {
"type": "object",
"properties": {
"phone": {
"type": "string"
},
"type": {
"type": "string",
"example": "手机号登陆:fast_login 注册:register 修改密码:update_password"
}
}
},
"md.UpdateAdminReq": { "md.UpdateAdminReq": {
"type": "object", "type": "object",
"required": [ "required": [


+ 544
- 22
docs/swagger.json View File

@@ -17,9 +17,9 @@
}, },
"host": "localhost:1003 or advertisement.dengbiao.top", "host": "localhost:1003 or advertisement.dengbiao.top",
"paths": { "paths": {
"/api/login": {
"post": {
"description": "登入",
"/api/account/base": {
"get": {
"description": "账号信息",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -27,25 +27,23 @@
"application/json" "application/json"
], ],
"tags": [ "tags": [
"ADMIN"
"账号中心------嘉俊"
], ],
"summary": "登陆",
"summary": "账号信息",
"parameters": [ "parameters": [
{ {
"description": "用户名密码",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.LoginReq"
}
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
} }
], ],
"responses": { "responses": {
"200": { "200": {
"description": "token",
"description": "具体看返回内容",
"schema": { "schema": {
"$ref": "#/definitions/md.LoginResponse"
"$ref": "#/definitions/md.AccountBase"
} }
}, },
"400": { "400": {
@@ -57,7 +55,7 @@
} }
} }
}, },
"/api/qualification/bank/save": {
"/api/account/qualification/bank/save": {
"post": { "post": {
"description": "资质认证-银行资质保存", "description": "资质认证-银行资质保存",
"consumes": [ "consumes": [
@@ -104,7 +102,7 @@
} }
} }
}, },
"/api/qualification/contact/save": {
"/api/account/qualification/contact/save": {
"post": { "post": {
"description": "资质认证-联系方式保存", "description": "资质认证-联系方式保存",
"consumes": [ "consumes": [
@@ -151,7 +149,7 @@
} }
} }
}, },
"/api/qualification/enterprise/save": {
"/api/account/qualification/enterprise/save": {
"post": { "post": {
"description": "资质认证-企业认证保存", "description": "资质认证-企业认证保存",
"consumes": [ "consumes": [
@@ -198,7 +196,7 @@
} }
} }
}, },
"/api/qualification/info": {
"/api/account/qualification/info": {
"get": { "get": {
"description": "资质认证-基本信息", "description": "资质认证-基本信息",
"consumes": [ "consumes": [
@@ -236,7 +234,7 @@
} }
} }
}, },
"/api/qualification/select/base": {
"/api/account/qualification/select/base": {
"get": { "get": {
"description": "资质认证-认证下拉框选择内容", "description": "资质认证-认证下拉框选择内容",
"consumes": [ "consumes": [
@@ -274,6 +272,304 @@
} }
} }
}, },
"/api/account/update/password": {
"post": {
"description": "资质认证-企业认证保存",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"账号中心------嘉俊"
],
"summary": "企业认证保存",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.AccountUpdatePasswordReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login": {
"post": {
"description": "登入",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"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/login/phone": {
"post": {
"description": "手机号登入",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"summary": "手机号登陆",
"parameters": [
{
"description": "用户名、验证码",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.LoginPhoneReq"
}
}
],
"responses": {
"200": {
"description": "token",
"schema": {
"$ref": "#/definitions/md.LoginResponse"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login/register": {
"post": {
"description": "手机号注册",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN"
],
"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/medium/list": {
"post": {
"description": "媒体中心-媒体列表",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"媒体中心------嘉俊"
],
"summary": "媒体列表",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "具体看返回内容 data里面的数据",
"schema": {
"$ref": "#/definitions/md.MediumListRes"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/qiniuyun/upload": {
"post": {
"description": "七牛云-七牛云上传",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"七牛云"
],
"summary": "七牛云上传",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header"
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.ImgReqUpload"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/role/UpdateRoleState": {
"post": {
"description": "修改角色状态",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ADMIN-权限管理"
],
"summary": "修改角色状态",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.UpdateRoleStateReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/role/addAdmin": { "/api/role/addAdmin": {
"post": { "post": {
"description": "新增管理员", "description": "新增管理员",
@@ -818,7 +1114,7 @@
}, },
"/api/role/updateRole": { "/api/role/updateRole": {
"post": { "post": {
"description": "修改角色状态",
"description": "修改角色",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -828,7 +1124,7 @@
"tags": [ "tags": [
"ADMIN-权限管理" "ADMIN-权限管理"
], ],
"summary": "修改角色状态",
"summary": "修改角色",
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@@ -843,7 +1139,53 @@
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/md.UpdateRoleStateReq"
"$ref": "#/definitions/md.UpdateRoleReq"
}
}
],
"responses": {
"200": {
"description": "success",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/sms": {
"post": {
"description": "短信-短信发送",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"短信"
],
"summary": "短信发送",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header"
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.SmsReq"
} }
} }
], ],
@@ -865,6 +1207,68 @@
} }
}, },
"definitions": { "definitions": {
"md.AccountBase": {
"type": "object",
"properties": {
"admin_phone": {
"type": "string",
"example": "管理员手机号"
},
"agent_id": {
"type": "string",
"example": "账户ID"
},
"company_abbreviation": {
"type": "string",
"example": "公司简称"
},
"company_name": {
"type": "string",
"example": "公司名称"
},
"contact_address": {
"type": "string",
"example": "联系地址"
},
"contact_email": {
"type": "string",
"example": "邮箱"
},
"contact_name": {
"type": "string",
"example": "联系人"
},
"contact_phone": {
"type": "string",
"example": "联系电话"
},
"country_region": {
"type": "string",
"example": "国家地区"
},
"currency_conf": {
"type": "string",
"example": "结算币种"
},
"nickname": {
"type": "string",
"example": "昵称"
}
}
},
"md.AccountUpdatePasswordReq": {
"type": "object",
"properties": {
"captcha": {
"type": "string",
"example": "验证码"
},
"password": {
"type": "string",
"example": "登录密码"
}
}
},
"md.AddAdminReq": { "md.AddAdminReq": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -1070,6 +1474,38 @@
} }
} }
}, },
"md.ImgReqUpload": {
"type": "object",
"properties": {
"dir": {
"type": "string"
},
"file_name": {
"type": "string"
},
"file_size": {
"description": "文件大小, 单位byte",
"type": "integer"
}
}
},
"md.LoginPhoneReq": {
"type": "object",
"required": [
"captcha",
"username"
],
"properties": {
"captcha": {
"type": "string",
"example": "验证码"
},
"username": {
"type": "string",
"example": "登录账号"
}
}
},
"md.LoginReq": { "md.LoginReq": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -1099,6 +1535,67 @@
} }
} }
}, },
"md.MediumListData": {
"type": "object",
"properties": {
"account": {
"type": "string",
"example": "媒体账号"
},
"business_license_address": {
"type": "string",
"example": "营业执照地址"
},
"company_name": {
"type": "string",
"example": "公司名称"
},
"id": {
"type": "string",
"example": "id"
},
"legal_representative": {
"type": "string",
"example": "法定代表人"
},
"medium_id": {
"type": "string",
"example": "媒体id"
},
"memo": {
"type": "string",
"example": "备注 审核时填写的"
},
"state": {
"type": "string",
"example": "状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)"
},
"unified_social_credit_code": {
"type": "string",
"example": "统一社会信用代码"
}
}
},
"md.MediumListRes": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/md.MediumListData"
}
},
"state": {
"type": "array",
"items": {
"$ref": "#/definitions/md.SelectData"
}
},
"total": {
"type": "integer"
}
}
},
"md.Response": { "md.Response": {
"type": "object", "type": "object",
"properties": { "properties": {
@@ -1132,6 +1629,31 @@
} }
} }
}, },
"md.SelectData": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "名称"
},
"value": {
"type": "string",
"example": "值"
}
}
},
"md.SmsReq": {
"type": "object",
"properties": {
"phone": {
"type": "string"
},
"type": {
"type": "string",
"example": "手机号登陆:fast_login 注册:register 修改密码:update_password"
}
}
},
"md.UpdateAdminReq": { "md.UpdateAdminReq": {
"type": "object", "type": "object",
"required": [ "required": [


+ 371
- 20
docs/swagger.yaml View File

@@ -1,4 +1,49 @@
definitions: definitions:
md.AccountBase:
properties:
admin_phone:
example: 管理员手机号
type: string
agent_id:
example: 账户ID
type: string
company_abbreviation:
example: 公司简称
type: string
company_name:
example: 公司名称
type: string
contact_address:
example: 联系地址
type: string
contact_email:
example: 邮箱
type: string
contact_name:
example: 联系人
type: string
contact_phone:
example: 联系电话
type: string
country_region:
example: 国家地区
type: string
currency_conf:
example: 结算币种
type: string
nickname:
example: 昵称
type: string
type: object
md.AccountUpdatePasswordReq:
properties:
captcha:
example: 验证码
type: string
password:
example: 登录密码
type: string
type: object
md.AddAdminReq: md.AddAdminReq:
properties: properties:
memo: memo:
@@ -134,6 +179,28 @@ definitions:
required: required:
- id - id
type: object type: object
md.ImgReqUpload:
properties:
dir:
type: string
file_name:
type: string
file_size:
description: 文件大小, 单位byte
type: integer
type: object
md.LoginPhoneReq:
properties:
captcha:
example: 验证码
type: string
username:
example: 登录账号
type: string
required:
- captcha
- username
type: object
md.LoginReq: md.LoginReq:
properties: properties:
code: code:
@@ -154,6 +221,49 @@ definitions:
token: token:
type: string type: string
type: object type: object
md.MediumListData:
properties:
account:
example: 媒体账号
type: string
business_license_address:
example: 营业执照地址
type: string
company_name:
example: 公司名称
type: string
id:
example: id
type: string
legal_representative:
example: 法定代表人
type: string
medium_id:
example: 媒体id
type: string
memo:
example: 备注 审核时填写的
type: string
state:
example: 状态(0:待提交 1:待审核 2:审核通过 3:审核拒绝)
type: string
unified_social_credit_code:
example: 统一社会信用代码
type: string
type: object
md.MediumListRes:
properties:
list:
items:
$ref: '#/definitions/md.MediumListData'
type: array
state:
items:
$ref: '#/definitions/md.SelectData'
type: array
total:
type: integer
type: object
md.Response: md.Response:
properties: properties:
code: code:
@@ -176,6 +286,23 @@ definitions:
required: required:
- role_id - role_id
type: object type: object
md.SelectData:
properties:
name:
example: 名称
type: string
value:
example: 值
type: string
type: object
md.SmsReq:
properties:
phone:
type: string
type:
example: 手机号登陆:fast_login 注册:register 修改密码:update_password
type: string
type: object
md.UpdateAdminReq: md.UpdateAdminReq:
properties: properties:
id: id:
@@ -238,33 +365,32 @@ info:
title: 广告联盟-渠道代理平台 title: 广告联盟-渠道代理平台
version: "1.0" version: "1.0"
paths: paths:
/api/login:
post:
/api/account/base:
get:
consumes: consumes:
- application/json - application/json
description: 登入
description: 账号信息
parameters: parameters:
- description: 用户名密码
in: body
name: req
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true required: true
schema:
$ref: '#/definitions/md.LoginReq'
type: string
produces: produces:
- application/json - application/json
responses: responses:
"200": "200":
description: token
description: 具体看返回内容
schema: schema:
$ref: '#/definitions/md.LoginResponse'
$ref: '#/definitions/md.AccountBase'
"400": "400":
description: 具体错误 description: 具体错误
schema: schema:
$ref: '#/definitions/md.Response' $ref: '#/definitions/md.Response'
summary: 登陆
summary: 账号信息
tags: tags:
- ADMIN
/api/qualification/bank/save:
- 账号中心------嘉俊
/api/account/qualification/bank/save:
post: post:
consumes: consumes:
- application/json - application/json
@@ -295,7 +421,7 @@ paths:
summary: 银行资质保存 summary: 银行资质保存
tags: tags:
- 资质认证------嘉俊 - 资质认证------嘉俊
/api/qualification/contact/save:
/api/account/qualification/contact/save:
post: post:
consumes: consumes:
- application/json - application/json
@@ -326,7 +452,7 @@ paths:
summary: 联系方式保存 summary: 联系方式保存
tags: tags:
- 资质认证------嘉俊 - 资质认证------嘉俊
/api/qualification/enterprise/save:
/api/account/qualification/enterprise/save:
post: post:
consumes: consumes:
- application/json - application/json
@@ -357,7 +483,7 @@ paths:
summary: 企业认证保存 summary: 企业认证保存
tags: tags:
- 资质认证------嘉俊 - 资质认证------嘉俊
/api/qualification/info:
/api/account/qualification/info:
get: get:
consumes: consumes:
- application/json - application/json
@@ -382,7 +508,7 @@ paths:
summary: 基本信息 summary: 基本信息
tags: tags:
- 资质认证------嘉俊 - 资质认证------嘉俊
/api/qualification/select/base:
/api/account/qualification/select/base:
get: get:
consumes: consumes:
- application/json - application/json
@@ -407,6 +533,201 @@ paths:
summary: 认证下拉框选择内容 summary: 认证下拉框选择内容
tags: tags:
- 资质认证------嘉俊 - 资质认证------嘉俊
/api/account/update/password:
post:
consumes:
- application/json
description: 资质认证-企业认证保存
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.AccountUpdatePasswordReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 企业认证保存
tags:
- 账号中心------嘉俊
/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:
- ADMIN
/api/login/phone:
post:
consumes:
- application/json
description: 手机号登入
parameters:
- description: 用户名、验证码
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.LoginPhoneReq'
produces:
- application/json
responses:
"200":
description: token
schema:
$ref: '#/definitions/md.LoginResponse'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 手机号登陆
tags:
- ADMIN
/api/login/register:
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:
- ADMIN
/api/medium/list:
post:
consumes:
- application/json
description: 媒体中心-媒体列表
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: 具体看返回内容 data里面的数据
schema:
$ref: '#/definitions/md.MediumListRes'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 媒体列表
tags:
- 媒体中心------嘉俊
/api/qiniuyun/upload:
post:
consumes:
- application/json
description: 七牛云-七牛云上传
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.ImgReqUpload'
produces:
- application/json
responses:
"200":
description: success
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 七牛云上传
tags:
- 七牛云
/api/role/UpdateRoleState:
post:
consumes:
- application/json
description: 修改角色状态
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.UpdateRoleStateReq'
produces:
- application/json
responses:
"200":
description: success
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 修改角色状态
tags:
- ADMIN-权限管理
/api/role/addAdmin: /api/role/addAdmin:
post: post:
consumes: consumes:
@@ -769,7 +1090,7 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 修改角色状态
description: 修改角色
parameters: parameters:
- description: 验证参数Bearer和token空格拼接 - description: 验证参数Bearer和token空格拼接
in: header in: header
@@ -781,7 +1102,7 @@ paths:
name: args name: args
required: true required: true
schema: schema:
$ref: '#/definitions/md.UpdateRoleStateReq'
$ref: '#/definitions/md.UpdateRoleReq'
produces: produces:
- application/json - application/json
responses: responses:
@@ -793,9 +1114,39 @@ paths:
description: 具体错误 description: 具体错误
schema: schema:
$ref: '#/definitions/md.Response' $ref: '#/definitions/md.Response'
summary: 修改角色状态
summary: 修改角色
tags: tags:
- ADMIN-权限管理 - ADMIN-权限管理
/api/sms:
post:
consumes:
- application/json
description: 短信-短信发送
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.SmsReq'
produces:
- application/json
responses:
"200":
description: success
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 短信发送
tags:
- 短信
securityDefinitions: securityDefinitions:
MasterID: MasterID:
in: header in: header


Loading…
Cancel
Save