From c9ab5b03d21f9497592d21277cb8cc1b7b278d73 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 23 Aug 2024 11:51:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hdl_applet_application_ad_space_list.go | 2 +- app/hdl/hdl_login.go | 4 +- app/hdl/hdl_role.go | 2 +- docs/docs.go | 459 +++++++++++++++--- docs/swagger.json | 459 +++++++++++++++--- docs/swagger.yaml | 349 ++++++++++--- 6 files changed, 1066 insertions(+), 209 deletions(-) diff --git a/app/hdl/hdl_applet_application_ad_space_list.go b/app/hdl/hdl_applet_application_ad_space_list.go index b7e9b68..9d31848 100644 --- a/app/hdl/hdl_applet_application_ad_space_list.go +++ b/app/hdl/hdl_applet_application_ad_space_list.go @@ -15,7 +15,7 @@ import ( // @Param args body md.AppletApplicationAdSpaceListReq true "请求参数" // @Success 200 {object} md.AppletApplicationAdSpaceListRes "具体看返回内容---这是data里面的数据" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/applet/application/ad/space/save [POST] +// @Router /api/applet/application/ad/space/list [POST] func AppletApplicationAdSpaceList(c *gin.Context) { svc.AppletApplicationAdSpaceList(c) } diff --git a/app/hdl/hdl_login.go b/app/hdl/hdl_login.go index 0374c66..8a74bba 100644 --- a/app/hdl/hdl_login.go +++ b/app/hdl/hdl_login.go @@ -72,7 +72,7 @@ func Login(c *gin.Context) { // @Param req body md.LoginPhoneReq true "用户名、验证码" // @Success 200 {object} md.LoginResponse "token" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/login [post] +// @Router /api/login/phone [post] func LoginPhone(c *gin.Context) { var req md.LoginPhoneReq err := c.ShouldBindJSON(&req) @@ -120,7 +120,7 @@ func LoginPhone(c *gin.Context) { // @Param req body md.LoginReq true "用户名、验证码" // @Success 200 {object} md.LoginResponse "token" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/login [post] +// @Router /api/register [post] func Register(c *gin.Context) { var req md.RegisterReq err := c.ShouldBindJSON(&req) diff --git a/app/hdl/hdl_role.go b/app/hdl/hdl_role.go index 0e1cea2..3611eec 100644 --- a/app/hdl/hdl_role.go +++ b/app/hdl/hdl_role.go @@ -281,7 +281,7 @@ func RoleBindPermissionGroup(c *gin.Context) { // @Param args body md.UpdateRoleStateReq true "请求参数" // @Success 200 {string} "success" // @Failure 400 {object} md.Response "具体错误" -// @Router /api/role/updateRole [POST] +// @Router /api/role/updateRoleState [POST] func UpdateRoleState(c *gin.Context) { var req md.UpdateRoleStateReq err := c.ShouldBindJSON(&req) diff --git a/docs/docs.go b/docs/docs.go index 0e1a2a9..d9ab26b 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -25,9 +25,47 @@ const docTemplate = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { - "/api/applet/application/ad/space/save": { + "/api/account/base": { + "get": { + "description": "账号信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "账号中心------嘉俊" + ], + "summary": "账号信息", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "$ref": "#/definitions/md.AccountBase" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/account/qualification/bank/save": { "post": { - "description": "小程序应用-广告位新增", + "description": "资质认证-银行资质保存", "consumes": [ "application/json" ], @@ -35,9 +73,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "小程序应用------嘉俊" + "账号中心------嘉俊" ], - "summary": "广告位新增", + "summary": "银行资质保存", "parameters": [ { "type": "string", @@ -52,7 +90,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletApplicationAdSpaceSaveReq" + "$ref": "#/definitions/md.MediumBankInfo" } } ], @@ -72,9 +110,9 @@ const docTemplate = `{ } } }, - "/api/application/applet/list": { + "/api/account/qualification/contact/save": { "post": { - "description": "小程序应用-列表数据", + "description": "资质认证-联系方式保存", "consumes": [ "application/json" ], @@ -82,9 +120,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "小程序应用------嘉俊" + "账号中心------嘉俊" ], - "summary": "列表数据", + "summary": "联系方式保存", "parameters": [ { "type": "string", @@ -99,15 +137,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletApplicationListReq" + "$ref": "#/definitions/md.MediumContactInfo" } } ], "responses": { "200": { - "description": "具体看返回内容---这是data里面的数据", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.AppletApplicationListRes" + "type": "string" } }, "400": { @@ -119,9 +157,9 @@ const docTemplate = `{ } } }, - "/api/application/applet/save": { + "/api/account/qualification/enterprise/save": { "post": { - "description": "小程序应用-新增或保存", + "description": "资质认证-企业认证保存", "consumes": [ "application/json" ], @@ -129,9 +167,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "小程序应用------嘉俊" + "账号中心------嘉俊" ], - "summary": "新增或保存", + "summary": "企业认证保存", "parameters": [ { "type": "string", @@ -146,7 +184,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletApplicationSaveReq" + "$ref": "#/definitions/md.MediumList" } } ], @@ -166,9 +204,9 @@ const docTemplate = `{ } } }, - "/api/login": { - "post": { - "description": "手机号注册", + "/api/account/qualification/info": { + "get": { + "description": "资质认证-基本信息", "consumes": [ "application/json" ], @@ -176,25 +214,61 @@ const docTemplate = `{ "application/json" ], "tags": [ - "ADMIN" + "账号中心------嘉俊" ], - "summary": "手机号注册", + "summary": "基本信息", "parameters": [ { - "description": "用户名、验证码", - "name": "req", - "in": "body", - "required": true, + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.LoginReq" + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" } } + } + } + }, + "/api/account/qualification/select/base": { + "get": { + "description": "资质认证-认证下拉框选择内容", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "账号中心------嘉俊" + ], + "summary": "认证下拉框选择内容", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } ], "responses": { "200": { - "description": "token", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.LoginResponse" + "type": "string" } }, "400": { @@ -206,9 +280,9 @@ const docTemplate = `{ } } }, - "/api/qiniuyun/upload": { + "/api/account/update/password": { "post": { - "description": "七牛云-七牛云上传", + "description": "资质认证-企业认证保存", "consumes": [ "application/json" ], @@ -216,15 +290,16 @@ const docTemplate = `{ "application/json" ], "tags": [ - "七牛云" + "账号中心------嘉俊" ], - "summary": "七牛云上传", + "summary": "企业认证保存", "parameters": [ { "type": "string", "description": "验证参数Bearer和token空格拼接", "name": "Authorization", - "in": "header" + "in": "header", + "required": true }, { "description": "请求参数", @@ -232,13 +307,13 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.ImgReqUpload" + "$ref": "#/definitions/md.AccountUpdatePasswordReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -252,9 +327,9 @@ const docTemplate = `{ } } }, - "/api/qualification/bank/save": { + "/api/applet/application/ad/space/list": { "post": { - "description": "资质认证-银行资质保存", + "description": "小程序应用-广告位列表", "consumes": [ "application/json" ], @@ -262,9 +337,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "银行资质保存", + "summary": "广告位列表", "parameters": [ { "type": "string", @@ -279,15 +354,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumBankInfo" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListRes" } }, "400": { @@ -299,9 +374,9 @@ const docTemplate = `{ } } }, - "/api/qualification/contact/save": { + "/api/applet/application/ad/space/save": { "post": { - "description": "资质认证-联系方式保存", + "description": "小程序应用-广告位新增", "consumes": [ "application/json" ], @@ -309,9 +384,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "联系方式保存", + "summary": "广告位新增", "parameters": [ { "type": "string", @@ -326,7 +401,7 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumContactInfo" + "$ref": "#/definitions/md.AppletApplicationAdSpaceSaveReq" } } ], @@ -346,9 +421,9 @@ const docTemplate = `{ } } }, - "/api/qualification/enterprise/save": { + "/api/application/applet/list": { "post": { - "description": "资质认证-企业认证保存", + "description": "小程序应用-列表数据", "consumes": [ "application/json" ], @@ -356,9 +431,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "企业认证保存", + "summary": "列表数据", "parameters": [ { "type": "string", @@ -373,15 +448,15 @@ const docTemplate = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumList" + "$ref": "#/definitions/md.AppletApplicationListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationListRes" } }, "400": { @@ -393,9 +468,9 @@ const docTemplate = `{ } } }, - "/api/qualification/info": { - "get": { - "description": "资质认证-基本信息", + "/api/application/applet/save": { + "post": { + "description": "小程序应用-新增或保存", "consumes": [ "application/json" ], @@ -403,9 +478,9 @@ const docTemplate = `{ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "基本信息", + "summary": "新增或保存", "parameters": [ { "type": "string", @@ -413,6 +488,15 @@ const docTemplate = `{ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AppletApplicationSaveReq" + } } ], "responses": { @@ -431,9 +515,9 @@ const docTemplate = `{ } } }, - "/api/qualification/select/base": { - "get": { - "description": "资质认证-认证下拉框选择内容", + "/api/login": { + "post": { + "description": "登入", "consumes": [ "application/json" ], @@ -441,21 +525,109 @@ const docTemplate = `{ "application/json" ], "tags": [ - "资质认证------嘉俊" + "ADMIN" ], - "summary": "认证下拉框选择内容", + "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/qiniuyun/upload": { + "post": { + "description": "七牛云-七牛云上传", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "七牛云" + ], + "summary": "七牛云上传", "parameters": [ { "type": "string", "description": "验证参数Bearer和token空格拼接", "name": "Authorization", - "in": "header", - "required": true + "in": "header" + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.ImgReqUpload" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "success", "schema": { "type": "string" } @@ -469,6 +641,46 @@ const docTemplate = `{ } } }, + "/api/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/role/addAdmin": { "post": { "description": "新增管理员", @@ -1012,6 +1224,53 @@ const docTemplate = `{ } }, "/api/role/updateRole": { + "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.UpdateRoleReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/updateRoleState": { "post": { "description": "修改角色状态", "consumes": [ @@ -1106,6 +1365,68 @@ const docTemplate = `{ } }, "definitions": { + "md.AccountBase": { + "type": "object", + "properties": { + "admin_phone": { + "type": "string", + "example": "管理员手机号" + }, + "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": "结算币种" + }, + "medium_id": { + "type": "string", + "example": "账户ID" + }, + "nickname": { + "type": "string", + "example": "昵称" + } + } + }, + "md.AccountUpdatePasswordReq": { + "type": "object", + "properties": { + "captcha": { + "type": "string", + "example": "验证码" + }, + "password": { + "type": "string", + "example": "登录密码" + } + } + }, "md.AddAdminReq": { "type": "object", "required": [ @@ -1679,7 +2000,7 @@ const docTemplate = `{ }, "type": { "type": "string", - "example": "手机号登陆:fast_login 注册:register" + "example": "手机号登陆:fast_login 注册:register 修改密码(不用传手机号):update_password" } } }, diff --git a/docs/swagger.json b/docs/swagger.json index d16434c..03583f4 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -17,9 +17,47 @@ }, "host": "localhost:1004 or xxxxx.medium.dengbiao.top", "paths": { - "/api/applet/application/ad/space/save": { + "/api/account/base": { + "get": { + "description": "账号信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "账号中心------嘉俊" + ], + "summary": "账号信息", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", + "schema": { + "$ref": "#/definitions/md.AccountBase" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/account/qualification/bank/save": { "post": { - "description": "小程序应用-广告位新增", + "description": "资质认证-银行资质保存", "consumes": [ "application/json" ], @@ -27,9 +65,9 @@ "application/json" ], "tags": [ - "小程序应用------嘉俊" + "账号中心------嘉俊" ], - "summary": "广告位新增", + "summary": "银行资质保存", "parameters": [ { "type": "string", @@ -44,7 +82,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletApplicationAdSpaceSaveReq" + "$ref": "#/definitions/md.MediumBankInfo" } } ], @@ -64,9 +102,9 @@ } } }, - "/api/application/applet/list": { + "/api/account/qualification/contact/save": { "post": { - "description": "小程序应用-列表数据", + "description": "资质认证-联系方式保存", "consumes": [ "application/json" ], @@ -74,9 +112,9 @@ "application/json" ], "tags": [ - "小程序应用------嘉俊" + "账号中心------嘉俊" ], - "summary": "列表数据", + "summary": "联系方式保存", "parameters": [ { "type": "string", @@ -91,15 +129,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletApplicationListReq" + "$ref": "#/definitions/md.MediumContactInfo" } } ], "responses": { "200": { - "description": "具体看返回内容---这是data里面的数据", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.AppletApplicationListRes" + "type": "string" } }, "400": { @@ -111,9 +149,9 @@ } } }, - "/api/application/applet/save": { + "/api/account/qualification/enterprise/save": { "post": { - "description": "小程序应用-新增或保存", + "description": "资质认证-企业认证保存", "consumes": [ "application/json" ], @@ -121,9 +159,9 @@ "application/json" ], "tags": [ - "小程序应用------嘉俊" + "账号中心------嘉俊" ], - "summary": "新增或保存", + "summary": "企业认证保存", "parameters": [ { "type": "string", @@ -138,7 +176,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.AppletApplicationSaveReq" + "$ref": "#/definitions/md.MediumList" } } ], @@ -158,9 +196,9 @@ } } }, - "/api/login": { - "post": { - "description": "手机号注册", + "/api/account/qualification/info": { + "get": { + "description": "资质认证-基本信息", "consumes": [ "application/json" ], @@ -168,25 +206,61 @@ "application/json" ], "tags": [ - "ADMIN" + "账号中心------嘉俊" ], - "summary": "手机号注册", + "summary": "基本信息", "parameters": [ { - "description": "用户名、验证码", - "name": "req", - "in": "body", - "required": true, + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.LoginReq" + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" } } + } + } + }, + "/api/account/qualification/select/base": { + "get": { + "description": "资质认证-认证下拉框选择内容", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "账号中心------嘉俊" + ], + "summary": "认证下拉框选择内容", + "parameters": [ + { + "type": "string", + "description": "验证参数Bearer和token空格拼接", + "name": "Authorization", + "in": "header", + "required": true + } ], "responses": { "200": { - "description": "token", + "description": "具体看返回内容", "schema": { - "$ref": "#/definitions/md.LoginResponse" + "type": "string" } }, "400": { @@ -198,9 +272,9 @@ } } }, - "/api/qiniuyun/upload": { + "/api/account/update/password": { "post": { - "description": "七牛云-七牛云上传", + "description": "资质认证-企业认证保存", "consumes": [ "application/json" ], @@ -208,15 +282,16 @@ "application/json" ], "tags": [ - "七牛云" + "账号中心------嘉俊" ], - "summary": "七牛云上传", + "summary": "企业认证保存", "parameters": [ { "type": "string", "description": "验证参数Bearer和token空格拼接", "name": "Authorization", - "in": "header" + "in": "header", + "required": true }, { "description": "请求参数", @@ -224,13 +299,13 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.ImgReqUpload" + "$ref": "#/definitions/md.AccountUpdatePasswordReq" } } ], "responses": { "200": { - "description": "success", + "description": "具体看返回内容", "schema": { "type": "string" } @@ -244,9 +319,9 @@ } } }, - "/api/qualification/bank/save": { + "/api/applet/application/ad/space/list": { "post": { - "description": "资质认证-银行资质保存", + "description": "小程序应用-广告位列表", "consumes": [ "application/json" ], @@ -254,9 +329,9 @@ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "银行资质保存", + "summary": "广告位列表", "parameters": [ { "type": "string", @@ -271,15 +346,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumBankInfo" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationAdSpaceListRes" } }, "400": { @@ -291,9 +366,9 @@ } } }, - "/api/qualification/contact/save": { + "/api/applet/application/ad/space/save": { "post": { - "description": "资质认证-联系方式保存", + "description": "小程序应用-广告位新增", "consumes": [ "application/json" ], @@ -301,9 +376,9 @@ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "联系方式保存", + "summary": "广告位新增", "parameters": [ { "type": "string", @@ -318,7 +393,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumContactInfo" + "$ref": "#/definitions/md.AppletApplicationAdSpaceSaveReq" } } ], @@ -338,9 +413,9 @@ } } }, - "/api/qualification/enterprise/save": { + "/api/application/applet/list": { "post": { - "description": "资质认证-企业认证保存", + "description": "小程序应用-列表数据", "consumes": [ "application/json" ], @@ -348,9 +423,9 @@ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "企业认证保存", + "summary": "列表数据", "parameters": [ { "type": "string", @@ -365,15 +440,15 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/md.MediumList" + "$ref": "#/definitions/md.AppletApplicationListReq" } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "具体看返回内容---这是data里面的数据", "schema": { - "type": "string" + "$ref": "#/definitions/md.AppletApplicationListRes" } }, "400": { @@ -385,9 +460,9 @@ } } }, - "/api/qualification/info": { - "get": { - "description": "资质认证-基本信息", + "/api/application/applet/save": { + "post": { + "description": "小程序应用-新增或保存", "consumes": [ "application/json" ], @@ -395,9 +470,9 @@ "application/json" ], "tags": [ - "资质认证------嘉俊" + "小程序应用------嘉俊" ], - "summary": "基本信息", + "summary": "新增或保存", "parameters": [ { "type": "string", @@ -405,6 +480,15 @@ "name": "Authorization", "in": "header", "required": true + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.AppletApplicationSaveReq" + } } ], "responses": { @@ -423,9 +507,9 @@ } } }, - "/api/qualification/select/base": { - "get": { - "description": "资质认证-认证下拉框选择内容", + "/api/login": { + "post": { + "description": "登入", "consumes": [ "application/json" ], @@ -433,21 +517,109 @@ "application/json" ], "tags": [ - "资质认证------嘉俊" + "ADMIN" ], - "summary": "认证下拉框选择内容", + "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/qiniuyun/upload": { + "post": { + "description": "七牛云-七牛云上传", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "七牛云" + ], + "summary": "七牛云上传", "parameters": [ { "type": "string", "description": "验证参数Bearer和token空格拼接", "name": "Authorization", - "in": "header", - "required": true + "in": "header" + }, + { + "description": "请求参数", + "name": "args", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/md.ImgReqUpload" + } } ], "responses": { "200": { - "description": "具体看返回内容", + "description": "success", "schema": { "type": "string" } @@ -461,6 +633,46 @@ } } }, + "/api/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/role/addAdmin": { "post": { "description": "新增管理员", @@ -1004,6 +1216,53 @@ } }, "/api/role/updateRole": { + "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.UpdateRoleReq" + } + } + ], + "responses": { + "200": { + "description": "success", + "schema": { + "type": "string" + } + }, + "400": { + "description": "具体错误", + "schema": { + "$ref": "#/definitions/md.Response" + } + } + } + } + }, + "/api/role/updateRoleState": { "post": { "description": "修改角色状态", "consumes": [ @@ -1098,6 +1357,68 @@ } }, "definitions": { + "md.AccountBase": { + "type": "object", + "properties": { + "admin_phone": { + "type": "string", + "example": "管理员手机号" + }, + "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": "结算币种" + }, + "medium_id": { + "type": "string", + "example": "账户ID" + }, + "nickname": { + "type": "string", + "example": "昵称" + } + } + }, + "md.AccountUpdatePasswordReq": { + "type": "object", + "properties": { + "captcha": { + "type": "string", + "example": "验证码" + }, + "password": { + "type": "string", + "example": "登录密码" + } + } + }, "md.AddAdminReq": { "type": "object", "required": [ @@ -1671,7 +1992,7 @@ }, "type": { "type": "string", - "example": "手机号登陆:fast_login 注册:register" + "example": "手机号登陆:fast_login 注册:register 修改密码(不用传手机号):update_password" } } }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index d82a9cf..b57eb7d 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,4 +1,49 @@ definitions: + md.AccountBase: + properties: + admin_phone: + example: 管理员手机号 + 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 + medium_id: + example: 账户ID + type: string + nickname: + example: 昵称 + type: string + type: object + md.AccountUpdatePasswordReq: + properties: + captcha: + example: 验证码 + type: string + password: + example: 登录密码 + type: string + type: object md.AddAdminReq: properties: memo: @@ -388,7 +433,7 @@ definitions: phone: type: string type: - example: 手机号登陆:fast_login 注册:register + example: 手机号登陆:fast_login 注册:register 修改密码(不用传手机号):update_password type: string type: object md.UpdateAdminReq: @@ -453,11 +498,36 @@ info: title: 广告联盟-媒体平台 version: "1.0" paths: - /api/applet/application/ad/space/save: + /api/account/base: + get: + consumes: + - application/json + description: 账号信息 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 具体看返回内容 + schema: + $ref: '#/definitions/md.AccountBase' + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 账号信息 + tags: + - 账号中心------嘉俊 + /api/account/qualification/bank/save: post: consumes: - application/json - description: 小程序应用-广告位新增 + description: 资质认证-银行资质保存 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -469,7 +539,7 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AppletApplicationAdSpaceSaveReq' + $ref: '#/definitions/md.MediumBankInfo' produces: - application/json responses: @@ -481,14 +551,14 @@ paths: description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 广告位新增 + summary: 银行资质保存 tags: - - 小程序应用------嘉俊 - /api/application/applet/list: + - 账号中心------嘉俊 + /api/account/qualification/contact/save: post: consumes: - application/json - description: 小程序应用-列表数据 + description: 资质认证-联系方式保存 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -500,26 +570,26 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AppletApplicationListReq' + $ref: '#/definitions/md.MediumContactInfo' produces: - application/json responses: "200": - description: 具体看返回内容---这是data里面的数据 + description: 具体看返回内容 schema: - $ref: '#/definitions/md.AppletApplicationListRes' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 列表数据 + summary: 联系方式保存 tags: - - 小程序应用------嘉俊 - /api/application/applet/save: + - 账号中心------嘉俊 + /api/account/qualification/enterprise/save: post: consumes: - application/json - description: 小程序应用-新增或保存 + description: 资质认证-企业认证保存 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -531,7 +601,7 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.AppletApplicationSaveReq' + $ref: '#/definitions/md.MediumList' produces: - application/json responses: @@ -543,70 +613,95 @@ paths: description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 新增或保存 + summary: 企业认证保存 tags: - - 小程序应用------嘉俊 - /api/login: - post: + - 账号中心------嘉俊 + /api/account/qualification/info: + get: consumes: - application/json - description: 手机号注册 + description: 资质认证-基本信息 parameters: - - description: 用户名、验证码 - in: body - name: req + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization required: true - schema: - $ref: '#/definitions/md.LoginReq' + type: string produces: - application/json responses: "200": - description: token + description: 具体看返回内容 schema: - $ref: '#/definitions/md.LoginResponse' + type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 手机号注册 + summary: 基本信息 tags: - - ADMIN - /api/qiniuyun/upload: + - 账号中心------嘉俊 + /api/account/qualification/select/base: + get: + consumes: + - application/json + description: 资质认证-认证下拉框选择内容 + parameters: + - description: 验证参数Bearer和token空格拼接 + in: header + name: Authorization + required: true + type: string + produces: + - application/json + responses: + "200": + description: 具体看返回内容 + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 认证下拉框选择内容 + tags: + - 账号中心------嘉俊 + /api/account/update/password: post: consumes: - application/json - description: 七牛云-七牛云上传 + description: 资质认证-企业认证保存 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization + required: true type: string - description: 请求参数 in: body name: args required: true schema: - $ref: '#/definitions/md.ImgReqUpload' + $ref: '#/definitions/md.AccountUpdatePasswordReq' produces: - application/json responses: "200": - description: success + description: 具体看返回内容 schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 七牛云上传 + summary: 企业认证保存 tags: - - 七牛云 - /api/qualification/bank/save: + - 账号中心------嘉俊 + /api/applet/application/ad/space/list: post: consumes: - application/json - description: 资质认证-银行资质保存 + description: 小程序应用-广告位列表 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -618,26 +713,26 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.MediumBankInfo' + $ref: '#/definitions/md.AppletApplicationAdSpaceListReq' produces: - application/json responses: "200": - description: 具体看返回内容 + description: 具体看返回内容---这是data里面的数据 schema: - type: string + $ref: '#/definitions/md.AppletApplicationAdSpaceListRes' "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 银行资质保存 + summary: 广告位列表 tags: - - 资质认证------嘉俊 - /api/qualification/contact/save: + - 小程序应用------嘉俊 + /api/applet/application/ad/space/save: post: consumes: - application/json - description: 资质认证-联系方式保存 + description: 小程序应用-广告位新增 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -649,7 +744,7 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.MediumContactInfo' + $ref: '#/definitions/md.AppletApplicationAdSpaceSaveReq' produces: - application/json responses: @@ -661,14 +756,14 @@ paths: description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 联系方式保存 + summary: 广告位新增 tags: - - 资质认证------嘉俊 - /api/qualification/enterprise/save: + - 小程序应用------嘉俊 + /api/application/applet/list: post: consumes: - application/json - description: 资质认证-企业认证保存 + description: 小程序应用-列表数据 parameters: - description: 验证参数Bearer和token空格拼接 in: header @@ -680,32 +775,38 @@ paths: name: args required: true schema: - $ref: '#/definitions/md.MediumList' + $ref: '#/definitions/md.AppletApplicationListReq' produces: - application/json responses: "200": - description: 具体看返回内容 + description: 具体看返回内容---这是data里面的数据 schema: - type: string + $ref: '#/definitions/md.AppletApplicationListRes' "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 企业认证保存 + summary: 列表数据 tags: - - 资质认证------嘉俊 - /api/qualification/info: - get: + - 小程序应用------嘉俊 + /api/application/applet/save: + post: consumes: - application/json - description: 资质认证-基本信息 + description: 小程序应用-新增或保存 parameters: - description: 验证参数Bearer和token空格拼接 in: header name: Authorization required: true type: string + - description: 请求参数 + in: body + name: args + required: true + schema: + $ref: '#/definitions/md.AppletApplicationSaveReq' produces: - application/json responses: @@ -717,34 +818,117 @@ paths: description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 基本信息 + summary: 新增或保存 tags: - - 资质认证------嘉俊 - /api/qualification/select/base: - get: + - 小程序应用------嘉俊 + /api/login: + post: consumes: - application/json - description: 资质认证-认证下拉框选择内容 + 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/qiniuyun/upload: + 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.ImgReqUpload' produces: - application/json responses: "200": - description: 具体看返回内容 + description: success schema: type: string "400": description: 具体错误 schema: $ref: '#/definitions/md.Response' - summary: 认证下拉框选择内容 + summary: 七牛云上传 + tags: + - 七牛云 + /api/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/role/addAdmin: post: consumes: @@ -1104,6 +1288,37 @@ paths: tags: - ADMIN-权限管理 /api/role/updateRole: + 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.UpdateRoleReq' + produces: + - application/json + responses: + "200": + description: success + schema: + type: string + "400": + description: 具体错误 + schema: + $ref: '#/definitions/md.Response' + summary: 修改角色 + tags: + - ADMIN-权限管理 + /api/role/updateRoleState: post: consumes: - application/json