From 3d603d8fde88d756b225a45995fe4d7a772aa8b1 Mon Sep 17 00:00:00 2001 From: PandaGoAdmin <18610165312@163.com> Date: Tue, 18 Jan 2022 17:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9swagger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/develop/api/gen.go | 4 +- apps/develop/api/table.go | 10 +- apps/resource/api/email.go | 4 +- apps/resource/api/oss.go | 2 +- apps/system/api/api.go | 4 +- apps/system/api/user.go | 2 +- docs/docs.go | 3887 ++++++++++++++++++++++++++++- docs/swagger.json | 3887 ++++++++++++++++++++++++++++- docs/swagger.yaml | 2546 ++++++++++++++++++- resource/template/go/api.template | 4 +- 10 files changed, 10012 insertions(+), 338 deletions(-) diff --git a/apps/develop/api/gen.go b/apps/develop/api/gen.go index cc4bbab..8adda60 100644 --- a/apps/develop/api/gen.go +++ b/apps/develop/api/gen.go @@ -15,7 +15,7 @@ type GenApi struct { // @Description 获取JSON // @Tags 工具 / 生成工具 // @Param tableId path int true "tableId" -// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /develop/code/gen/preview/{tableId} [get] // @Security X-TOKEN func (e *GenApi) Preview(rc *ctx.ReqCtx) { @@ -27,7 +27,7 @@ func (e *GenApi) Preview(rc *ctx.ReqCtx) { // @Description 获取JSON // @Tags 工具 / 生成工具 // @Param tableId path int true "tableId" -// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /develop/code/gen/code/{tableId} [get] // @Security X-TOKEN func (e *GenApi) GenCode(rc *ctx.ReqCtx) { diff --git a/apps/develop/api/table.go b/apps/develop/api/table.go index 217a789..2d7d056 100644 --- a/apps/develop/api/table.go +++ b/apps/develop/api/table.go @@ -21,7 +21,7 @@ type GenTableApi struct { // @Param tableName query string false "tableName / 数据表名称" // @Param pageSize query int false "pageSize / 页条数" // @Param pageNum query int false "pageNum / 页码" -// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /develop/code/table/db/list [get] func (g *GenTableApi) GetDBTableList(rc *ctx.ReqCtx) { pageNum := ginx.QueryInt(rc.GinCtx, "pageNum", 1) @@ -43,7 +43,7 @@ func (g *GenTableApi) GetDBTableList(rc *ctx.ReqCtx) { // @Param tableComment query string false "tableComment / 数据表描述" // @Param pageSize query int false "pageSize / 页条数" // @Param pageIndex query int false "pageIndex / 页码" -// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /develop/code/table/list [get] func (g *GenTableApi) GetTablePage(rc *ctx.ReqCtx) { pageNum := ginx.QueryInt(rc.GinCtx, "pageNum", 1) @@ -63,7 +63,7 @@ func (g *GenTableApi) GetTablePage(rc *ctx.ReqCtx) { // @Description 获取JSON // @Tags 工具 / 生成工具 // @Param tableId path int true "tableId" -// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /develop/code/table/info/{tableId} [get] // @Security Bearer func (g *GenTableApi) GetTableInfo(rc *ctx.ReqCtx) { @@ -79,7 +79,7 @@ func (g *GenTableApi) GetTableInfo(rc *ctx.ReqCtx) { // @Description 获取JSON // @Tags 工具 / 生成工具 // @Param tableName query string false "tableName / 数据表名称" -// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /develop/code/table/info/tableName [get] // @Security X-TOKEN func (g *GenTableApi) GetTableInfoByName(rc *ctx.ReqCtx) { @@ -94,7 +94,7 @@ func (g *GenTableApi) GetTableInfoByName(rc *ctx.ReqCtx) { // @Summary 获取树表信息 // @Description 获取JSON // @Tags 工具 / 生成工具 -// @Success 200 {object} response.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /develop/code/table/tableTree [get] // @Security X-TOKEN func (g *GenTableApi) GetTableTree(rc *ctx.ReqCtx) { diff --git a/apps/resource/api/email.go b/apps/resource/api/email.go index 831fdd3..335779c 100644 --- a/apps/resource/api/email.go +++ b/apps/resource/api/email.go @@ -58,7 +58,7 @@ func (p *ResEmailsApi) GetResEmailsList(rc *ctx.ReqCtx) { // @Tags ResEmails // @Param mailId path int true "mailId" // @Success 200 {string} string "{"code": 200, "data": [...]}" -// @Router /resource/email/{mailId }[get] +// @Router /resource/email/{mailId} [get] // @Security func (p *ResEmailsApi) GetResEmails(rc *ctx.ReqCtx) { mailId := ginx.PathParamInt(rc.GinCtx, "mailId") @@ -110,7 +110,7 @@ func (p *ResEmailsApi) UpdateResEmails(rc *ctx.ReqCtx) { // @Param mailId path string true "mailId" // @Success 200 {string} string "{"code": 200, "message": "删除成功"}" // @Success 200 {string} string "{"code": 400, "message": "删除失败"}" -// @Router /resource/email/{mailId } [delete] +// @Router /resource/email/{mailId} [delete] func (p *ResEmailsApi) DeleteResEmails(rc *ctx.ReqCtx) { mailId := rc.GinCtx.Param("mailId") diff --git a/apps/resource/api/oss.go b/apps/resource/api/oss.go index 945230f..5e6ff78 100644 --- a/apps/resource/api/oss.go +++ b/apps/resource/api/oss.go @@ -61,7 +61,7 @@ func (p *ResOssesApi) GetResOssesList(rc *ctx.ReqCtx) { // @Tags ResOsses // @Param ossId path int true "ossId" // @Success 200 {string} string "{"code": 200, "data": [...]}" -// @Router /resource/oss/{ossId }[get] +// @Router /resource/oss/{ossId} [get] // @Security func (p *ResOssesApi) GetResOsses(rc *ctx.ReqCtx) { ossId := ginx.PathParamInt(rc.GinCtx, "ossId") diff --git a/apps/system/api/api.go b/apps/system/api/api.go index 0cc042f..e0a2a23 100644 --- a/apps/system/api/api.go +++ b/apps/system/api/api.go @@ -76,7 +76,7 @@ func (s *SystemApiApi) GetApiList(rc *ctx.ReqCtx) { // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body request.GetById true "根据id获取api" +// @Param id path int true "根据id获取api" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /system/api/{id} [get] func (s *SystemApiApi) GetApiById(rc *ctx.ReqCtx) { @@ -115,7 +115,7 @@ func (s *SystemApiApi) GetAllApis(rc *ctx.ReqCtx) { // @Security X-TOKEN // @accept application/json // @Produce application/json -// @Param data body request.CasbinInReceive true "权限id, 权限模型列表" +// @Param roleKey query string true "权限id, 权限模型列表" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /casbin/getPolicyPathByRoleId [get] func (s *SystemApiApi) GetPolicyPathByRoleId(rc *ctx.ReqCtx) { diff --git a/apps/system/api/user.go b/apps/system/api/user.go index e0723b8..8d4a85b 100644 --- a/apps/system/api/user.go +++ b/apps/system/api/user.go @@ -254,7 +254,7 @@ func (u *UserApi) SysUserUpdatePwd(rc *ctx.ReqCtx) { // @Description 获取JSON // @Tags 用户 // @Param userId path int true "用户编码" -// @Success 200 {object} app.Response "{"code": 200, "data": [...]}" +// @Success 200 {string} string "{"code": 200, "data": [...]}" // @Router /system/user/sysUser/{userId} [get] // @Security func (u *UserApi) GetSysUser(rc *ctx.ReqCtx) { diff --git a/docs/docs.go b/docs/docs.go index 281639b..ef98917 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -23,24 +23,1805 @@ var doc = `{ "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { - "/api/db/:dbId/c-metadata": { - "get": {} + "/api/api": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "创建基础api", + "parameters": [ + { + "description": "api路径, api中文描述, api组, 方法", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysApi" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/exec-sql": { - "get": {} + "/casbin/getPolicyPathByRoleId": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "获取Api权限列表", + "parameters": [ + { + "type": "string", + "description": "权限id, 权限模型列表", + "name": "roleKey", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/hint-tables": { - "get": {} + "/develop/code/gen/code/{tableId}": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "代码生成", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/sql": { - "get": {}, - "post": {} + "/develop/code/gen/preview/{tableId}": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "代码视图", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/t-metadata": { - "get": {} + "/develop/code/table": { + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改表结构", + "consumes": [ + "application/json" + ], + "tags": [ + "工具 / 生成工具" + ], + "summary": "修改表结构", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.DevGenTable" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "添加表结构", + "consumes": [ + "application/json" + ], + "tags": [ + "工具 / 生成工具" + ], + "summary": "添加表结构", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/dbs": { - "get": {} + "/develop/code/table/db/list": { + "get": { + "description": "数据库表列分页列表 / database table column page list", + "tags": [ + "工具 / 生成工具" + ], + "summary": "分页列表数据 / page list data", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + }, + { + "type": "integer", + "description": "pageSize / 页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "pageNum / 页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/info/tableName": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "获取表信息", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/info/{tableId}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "获取表信息", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/list": { + "get": { + "description": "生成表分页列表", + "tags": [ + "工具 / 生成工具" + ], + "summary": "分页列表数据", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + }, + { + "type": "string", + "description": "tableComment / 数据表描述", + "name": "tableComment", + "in": "query" + }, + { + "type": "integer", + "description": "pageSize / 页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "pageIndex / 页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/tableTree": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "获取树表信息", + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/{tableId}": { + "delete": { + "description": "删除表结构", + "tags": [ + "工具 / 生成工具" + ], + "summary": "删除表结构", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "任务" + ], + "summary": "修改JOB", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysJob" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/changeStatus": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "任务" + ], + "summary": "修改JOB状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/from.JobStatus" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/job": { + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "任务" + ], + "summary": "添加任务", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysJob" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "任务" + ], + "summary": "job列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "jobName", + "name": "jobName", + "in": "query" + }, + { + "type": "string", + "description": "jobGroup", + "name": "jobGroup", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/stop/{jobId}": { + "get": { + "description": "开始Job", + "tags": [ + "任务" + ], + "summary": "开始JOB", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/{jobId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "任务" + ], + "summary": "获取一个job", + "parameters": [ + { + "type": "integer", + "description": "jobId", + "name": "jobId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "任务" + ], + "summary": "批量删除JOB", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的infoId", + "name": "infoId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logJob/all": { + "delete": { + "description": "删除数据", + "tags": [ + "任务日志" + ], + "summary": "清空登录日志", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logJob/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "任务日志" + ], + "summary": "Job日志列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "jobGroup", + "name": "jobGroup", + "in": "query" + }, + { + "type": "string", + "description": "name", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logJob/{logId}": { + "delete": { + "description": "删除数据", + "tags": [ + "任务日志" + ], + "summary": "批量删除登录日志", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的logId", + "name": "logId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "登录日志" + ], + "summary": "修改登录日志", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.LogLogin" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin/all": { + "delete": { + "description": "删除数据", + "tags": [ + "登录日志" + ], + "summary": "清空登录日志", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "登录日志列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "username", + "name": "username", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin/{infoId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "通过编码获取登录日志", + "parameters": [ + { + "type": "integer", + "description": "infoId", + "name": "infoId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "登录日志" + ], + "summary": "批量删除登录日志", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的infoId", + "name": "infoId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logOper/all": { + "delete": { + "description": "删除数据", + "tags": [ + "操作日志" + ], + "summary": "清空操作日志", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logOper/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "操作日志" + ], + "summary": "操作日志列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "operName", + "name": "operName", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logOper/{operId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "操作日志" + ], + "summary": "通过编码获取操作日志", + "parameters": [ + { + "type": "integer", + "description": "operId", + "name": "operId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "操作日志" + ], + "summary": "批量删除操作日志", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的operId", + "name": "operId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResEmails" + ], + "summary": "修改ResEmails", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResEmail" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResEmails" + ], + "summary": "添加ResEmails", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResEmail" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email/debugMail": { + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResEmails" + ], + "summary": "测试发邮件", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/from.SendMail" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email/list": { + "get": { + "security": [ + { + "": [] + } + ], + "tags": [ + "ResEmails" + ], + "summary": "ResEmails列表数据", + "parameters": [ + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + }, + { + "type": "string", + "description": "状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "分类", + "name": "category", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email/{mailId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "ResEmails" + ], + "summary": "获取ResEmails", + "parameters": [ + { + "type": "integer", + "description": "mailId", + "name": "mailId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "ResEmails" + ], + "summary": "删除ResEmails", + "parameters": [ + { + "type": "string", + "description": "mailId", + "name": "mailId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResOsses" + ], + "summary": "修改ResOsses状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResOss" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResOsses" + ], + "summary": "添加ResOsses", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResOss" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss/list": { + "get": { + "security": [ + { + "": [] + } + ], + "tags": [ + "ResOsses" + ], + "summary": "ResOsses列表数据", + "parameters": [ + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + }, + { + "type": "string", + "description": "状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "分类", + "name": "category", + "in": "query" + }, + { + "type": "string", + "description": "编号", + "name": "ossCode", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss/uploadFile": { + "post": { + "description": "上传文件", + "tags": [ + "ResOsses" + ], + "summary": "上传文件ResOsses", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss/{ossId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "ResOsses" + ], + "summary": "获取ResOsses", + "parameters": [ + { + "type": "integer", + "description": "ossId", + "name": "ossId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "ResOsses" + ], + "summary": "删除ResOsses", + "parameters": [ + { + "type": "string", + "description": "ossId", + "name": "ossId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api": { + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "创建基础api", + "parameters": [ + { + "description": "api路径, api中文描述, api组, 方法", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysApi" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"创建成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api/all": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "获取所有的Api 不分页", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "分页获取API列表", + "parameters": [ + { + "type": "string", + "description": "path", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "description", + "name": "description", + "in": "query" + }, + { + "type": "string", + "description": "method", + "name": "method", + "in": "query" + }, + { + "type": "string", + "description": "apiGroup", + "name": "apiGroup", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api/{id}": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "根据id获取api", + "parameters": [ + { + "type": "integer", + "description": "根据id获取api", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "删除api", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/config": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "配置" + ], + "summary": "配置列表数据", + "parameters": [ + { + "type": "string", + "description": "configName", + "name": "configName", + "in": "query" + }, + { + "type": "string", + "description": "configKey", + "name": "configKey", + "in": "query" + }, + { + "type": "string", + "description": "configType", + "name": "configType", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "配置" + ], + "summary": "修改配置", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysConfig" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "配置" + ], + "summary": "添加配置", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysConfig" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/config/configKey": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "配置" + ], + "summary": "配置列表数据ByKey", + "parameters": [ + { + "type": "string", + "description": "configKey", + "name": "configKey", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/config/{configId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "配置" + ], + "summary": "获取配置", + "parameters": [ + { + "type": "integer", + "description": "configId", + "name": "configId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "配置" + ], + "summary": "删除配置", + "parameters": [ + { + "type": "string", + "description": "configId 多个使用逗号分割", + "name": "configId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } }, "/system/dept": { "put": { @@ -112,28 +1893,6 @@ var doc = `{ } } }, - "/system/dept/deptAllList": { - "get": { - "security": [ - { - "": [] - } - ], - "description": "部门列表", - "tags": [ - "部门" - ], - "summary": "所有部门列表数据", - "responses": { - "200": { - "description": "{\"code\": 200, \"data\": [...]}", - "schema": { - "type": "string" - } - } - } - } - }, "/system/dept/deptList": { "get": { "security": [ @@ -160,7 +1919,7 @@ var doc = `{ "in": "query" }, { - "type": "string", + "type": "integer", "description": "deptId", "name": "deptId", "in": "query" @@ -202,7 +1961,7 @@ var doc = `{ "in": "query" }, { - "type": "string", + "type": "integer", "description": "deptId", "name": "deptId", "in": "query" @@ -218,25 +1977,21 @@ var doc = `{ } } }, - "/system/dept/roleDeptTreSelect/{roleId}": { - "delete": { - "description": "获取角色部门树", + "/system/dept/ordinaryDeptLis": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "部门列表", "tags": [ "部门" ], - "summary": "获取角色部门", - "parameters": [ - { - "type": "integer", - "description": "roleId", - "name": "roleId", - "in": "path", - "required": true - } - ], + "summary": "所有部门列表数据", "responses": { "200": { - "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { "type": "string" } @@ -272,9 +2027,7 @@ var doc = `{ } } } - } - }, - "/system/dept/{id}": { + }, "delete": { "description": "删除数据", "tags": [ @@ -283,8 +2036,8 @@ var doc = `{ "summary": "删除部门", "parameters": [ { - "type": "integer", - "description": "deptId", + "type": "string", + "description": "deptId, 逗号隔开", "name": "deptId", "in": "path", "required": true @@ -300,7 +2053,77 @@ var doc = `{ } } }, - "/system/log/logLoginList": { + "/system/dict/data": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "字典" + ], + "summary": "修改字典数据", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictData" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "字典" + ], + "summary": "添加字典数据", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictData" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/data/list": { "get": { "security": [ { @@ -309,20 +2132,14 @@ var doc = `{ ], "description": "获取JSON", "tags": [ - "登录日志" + "字典" ], - "summary": "登录日志列表", + "summary": "字典数据列表", "parameters": [ { "type": "string", - "description": "status", - "name": "status", - "in": "query" - }, - { - "type": "string", - "description": "dictCode", - "name": "dictCode", + "description": "dictLabel", + "name": "dictLabel", "in": "query" }, { @@ -331,6 +2148,246 @@ var doc = `{ "name": "dictType", "in": "query" }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/data/type": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "字典" + ], + "summary": "字典数据获取", + "parameters": [ + { + "type": "string", + "description": "dictType", + "name": "dictType", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/data/{dictCode}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "字典" + ], + "summary": "获取字典数据", + "parameters": [ + { + "type": "integer", + "description": "dictCode", + "name": "dictCode", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "字典" + ], + "summary": "删除字典数据", + "parameters": [ + { + "type": "string", + "description": "dictCode ", + "name": "dictCode", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/type": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "职位" + ], + "summary": "修改字典类型", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictType" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "字典" + ], + "summary": "添加字典类型", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictType" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/type/export": { + "get": { + "description": "导出数据", + "tags": [ + "用户" + ], + "summary": "导出用户", + "parameters": [ + { + "type": "string", + "description": "userName", + "name": "userName", + "in": "query" + }, + { + "type": "string", + "description": "phone", + "name": "phone", + "in": "query" + }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/type/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "职位" + ], + "summary": "字典类型列表数据", + "parameters": [ + { + "type": "string", + "description": "DictName", + "name": "dictName", + "in": "query" + }, + { + "type": "string", + "description": "dictType", + "name": "dictName", + "in": "query" + }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, { "type": "integer", "description": "页条数", @@ -354,6 +2411,125 @@ var doc = `{ } } }, + "/system/dict/type/{dictId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "字典" + ], + "summary": "获取字典类型", + "parameters": [ + { + "type": "integer", + "description": "dictId", + "name": "dictId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "字典" + ], + "summary": "删除字典类型", + "parameters": [ + { + "type": "string", + "description": "dictId ", + "name": "dictId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/menu": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "菜单" + ], + "summary": "修改菜单", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysMenu" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "菜单" + ], + "summary": "创建菜单", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysMenu" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/menu/menuList": { "get": { "security": [ @@ -375,8 +2551,8 @@ var doc = `{ }, { "type": "string", - "description": "visible", - "name": "visible", + "description": "IsHide", + "name": "IsHide", "in": "query" }, { @@ -396,6 +2572,37 @@ var doc = `{ } } }, + "/system/menu/menuPaths": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "菜单" + ], + "summary": "获取角色对应的菜单路径数组", + "parameters": [ + { + "type": "string", + "description": "roleKey", + "name": "roleKey", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/menu/menuRole": { "get": { "security": [ @@ -407,7 +2614,7 @@ var doc = `{ "tags": [ "菜单" ], - "summary": "根据角色名称获取菜单列表数据(左菜单使用)", + "summary": "登陆成功获取的路由,根据角色名称获取菜单列表数据(左菜单使用)", "responses": { "200": { "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", @@ -429,10 +2636,10 @@ var doc = `{ "tags": [ "菜单" ], - "summary": "获取角色的部门树", + "summary": "获取角色的菜单树", "parameters": [ { - "type": "string", + "type": "integer", "description": "roleId", "name": "roleId", "in": "path" @@ -470,21 +2677,54 @@ var doc = `{ } } }, - "/system/menu/menuids/{menuName}": { + "/system/menu/{menuId}": { "get": { "security": [ { - "X-TOKEN": [] + "Bearer": [] } ], "description": "获取JSON", "tags": [ "菜单" ], - "summary": "获取角色对应的菜单id数组", + "summary": "Menu列表数据", + "parameters": [ + { + "type": "string", + "description": "menuId", + "name": "menuId", + "in": "path", + "required": true + } + ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "菜单" + ], + "summary": "删除菜单", + "parameters": [ + { + "type": "integer", + "description": "menuId", + "name": "menuId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", "schema": { "type": "string" } @@ -492,7 +2732,103 @@ var doc = `{ } } }, - "/system/post/post": { + "/system/notice": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "通知" + ], + "summary": "修改通知", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysNotice" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "通知" + ], + "summary": "添加通知", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysNotice" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/notice/{noticeId}": { + "delete": { + "description": "删除数据", + "tags": [ + "通知" + ], + "summary": "删除通知", + "parameters": [ + { + "type": "string", + "description": "noticeId ", + "name": "noticeId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/post": { "get": { "security": [ { @@ -517,12 +2853,6 @@ var doc = `{ "name": "postCode", "in": "query" }, - { - "type": "string", - "description": "postId", - "name": "postId", - "in": "query" - }, { "type": "string", "description": "status", @@ -550,6 +2880,280 @@ var doc = `{ } } } + }, + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "职位" + ], + "summary": "修改职位", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysPost" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "职位" + ], + "summary": "添加职位", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysPost" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/post/{postId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "职位" + ], + "summary": "获取职位", + "parameters": [ + { + "type": "integer", + "description": "postId", + "name": "postId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "职位" + ], + "summary": "删除职位", + "parameters": [ + { + "type": "string", + "description": "postId ", + "name": "postId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/role": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "角色/Role" + ], + "summary": "获取Role数据", + "parameters": [ + { + "type": "string", + "description": "roleId", + "name": "roleId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "修改用户角色", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "创建角色", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/role/changeStatus": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "修改用户角色状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/role/dataScope": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "修改用户角色部门", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/system/role/rolelist": { @@ -606,7 +3210,33 @@ var doc = `{ } } }, - "/system/user/captcha": { + "/system/role/{roleId}": { + "delete": { + "description": "删除数据", + "tags": [ + "角色/Role" + ], + "summary": "删除用户角色", + "parameters": [ + { + "type": "string", + "description": "roleId 多个用,分割", + "name": "roleId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/getCaptcha": { "get": { "produces": [ "application/json" @@ -625,23 +3255,21 @@ var doc = `{ } } }, - "/system/user/getInfo": { + "/system/user/getInit": { "get": { "security": [ { "": [] } ], - "produces": [ - "application/json" - ], + "description": "获取JSON", "tags": [ - "Base" + "用户" ], - "summary": "用户统一信息", + "summary": "获取添加用户角色和职位", "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { "type": "string" } @@ -698,6 +3326,54 @@ var doc = `{ } } }, + "/system/user/profile": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "个人中心" + ], + "summary": "获取当前登录用户", + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/profileAvatar": { + "post": { + "description": "修改头像", + "tags": [ + "用户" + ], + "summary": "修改头像", + "parameters": [ + { + "type": "file", + "description": "file", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/user/refreshToken": { "get": { "produces": [ @@ -717,6 +3393,97 @@ var doc = `{ } } }, + "/system/user/sysUser": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "修改用户状态", + "parameters": [ + { + "description": "用户数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysUser" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "创建用户", + "parameters": [ + { + "description": "用户数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysUser" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/sysUser/{userId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "用户" + ], + "summary": "获取用户", + "parameters": [ + { + "type": "integer", + "description": "用户编码", + "name": "userId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/user/sysUserList": { "get": { "security": [ @@ -731,12 +3498,34 @@ var doc = `{ "summary": "列表数据", "parameters": [ { - "description": "user", - "name": "user", - "in": "body", - "schema": { - "$ref": "#/definitions/entity.SysUser" - } + "type": "string", + "description": "userName", + "name": "userName", + "in": "query" + }, + { + "type": "string", + "description": "phone", + "name": "phone", + "in": "query" + }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" } ], "responses": { @@ -748,9 +3537,497 @@ var doc = `{ } } } + }, + "/system/user/sysuser/{userId}": { + "delete": { + "description": "删除数据", + "tags": [ + "用户" + ], + "summary": "删除用户数据", + "parameters": [ + { + "type": "integer", + "description": "多个id 使用逗号隔开", + "name": "userId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/updatePwd": { + "post": { + "description": "修改密码", + "tags": [ + "用户" + ], + "summary": "修改密码", + "parameters": [ + { + "description": "pwd", + "name": "pwd", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysUserPwd" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } } }, "definitions": { + "casbin.CasbinRule": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "method": { + "type": "string" + }, + "path": { + "type": "string" + }, + "ptype": { + "type": "string" + }, + "roleKey": { + "type": "string" + }, + "v3": { + "type": "string" + }, + "v4": { + "type": "string" + }, + "v5": { + "type": "string" + } + } + }, + "entity.DevGenTable": { + "type": "object", + "properties": { + "businessName": { + "description": "生成业务名", + "type": "string" + }, + "className": { + "description": "实体类名称", + "type": "string" + }, + "columns": { + "description": "字段信息", + "type": "array", + "items": { + "$ref": "#/definitions/entity.DevGenTableColumn" + } + }, + "create_time": { + "type": "string" + }, + "functionAuthor": { + "description": "生成功能作者", + "type": "string" + }, + "functionName": { + "description": "生成功能名", + "type": "string" + }, + "moduleName": { + "description": "生成模块名", + "type": "string" + }, + "options": { + "description": "其它生成选项", + "type": "string" + }, + "packageName": { + "description": "生成包路径", + "type": "string" + }, + "pkColumn": { + "type": "string" + }, + "pkGoField": { + "type": "string" + }, + "pkJsonField": { + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "tableComment": { + "description": "表描述", + "type": "string" + }, + "tableId": { + "description": "编号", + "type": "integer" + }, + "tableName": { + "description": "表名称", + "type": "string" + }, + "tplCategory": { + "description": "使用的模板(crud单表操作 tree树表操作)", + "type": "string" + }, + "treeCode": { + "type": "string" + }, + "treeName": { + "type": "string" + }, + "treeParentCode": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.DevGenTableColumn": { + "type": "object", + "properties": { + "columnComment": { + "description": "列描述", + "type": "string" + }, + "columnId": { + "description": "编号", + "type": "integer" + }, + "columnKey": { + "type": "string" + }, + "columnName": { + "description": "列名称", + "type": "string" + }, + "columnType": { + "description": "列类型", + "type": "string" + }, + "dictType": { + "description": "字典类型", + "type": "string" + }, + "goField": { + "description": "Go字段名", + "type": "string" + }, + "goType": { + "description": "Go类型", + "type": "string" + }, + "htmlField": { + "description": "html字段名", + "type": "string" + }, + "htmlType": { + "description": "显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)", + "type": "string" + }, + "isEdit": { + "description": "是否编辑字段(1是)", + "type": "string" + }, + "isIncrement": { + "description": "是否自增(1是)", + "type": "string" + }, + "isInsert": { + "description": "是否为插入字段(1是)", + "type": "string" + }, + "isList": { + "description": "是否列表字段(1是)", + "type": "string" + }, + "isPk": { + "description": "是否主键(1是)", + "type": "string" + }, + "isQuery": { + "description": "是否查询字段(1是)", + "type": "string" + }, + "isRequired": { + "description": "是否必填(1是)", + "type": "string" + }, + "jsonField": { + "type": "string" + }, + "linkLabelId": { + "description": "关联表键名", + "type": "string" + }, + "linkLabelName": { + "description": "关联表字段值", + "type": "string" + }, + "linkTableClass": { + "description": "关联表类名", + "type": "string" + }, + "linkTableName": { + "description": "关联表名", + "type": "string" + }, + "linkTablePackage": { + "description": "关联表包名", + "type": "string" + }, + "queryType": { + "description": "查询方式(等于、不等于、大于、小于、范围)", + "type": "string" + }, + "sort": { + "description": "排序", + "type": "integer" + }, + "tableId": { + "description": "归属表编号", + "type": "integer" + }, + "tableName": { + "type": "string" + } + } + }, + "entity.LogLogin": { + "type": "object", + "properties": { + "browser": { + "type": "string" + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "infoId": { + "description": "主键", + "type": "integer" + }, + "ipaddr": { + "type": "string" + }, + "loginLocation": { + "type": "string" + }, + "loginTime": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "os": { + "type": "string" + }, + "params": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "entity.ResEmail": { + "type": "object", + "properties": { + "category": { + "description": "0 163邮箱,1 qq邮箱 2 企业邮箱", + "type": "string" + }, + "create_time": { + "type": "string" + }, + "from": { + "description": "邮箱账号", + "type": "string" + }, + "host": { + "description": "服务器地址", + "type": "string" + }, + "isSsl": { + "description": "是否开启ssl", + "type": "boolean" + }, + "mailId": { + "type": "integer" + }, + "nickname": { + "description": "发件人", + "type": "string" + }, + "port": { + "description": "服务器端口", + "type": "integer" + }, + "secret": { + "description": "邮箱密码", + "type": "string" + }, + "status": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.ResOss": { + "type": "object", + "properties": { + "accessKey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "description": "0 阿里云 1.七牛云 2. 腾讯云", + "type": "string" + }, + "create_time": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "ossCode": { + "type": "string" + }, + "ossId": { + "type": "integer" + }, + "region": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "status": { + "description": "0.启用 1.禁止", + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysApi": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "apiGroup": { + "description": "api组", + "type": "string" + }, + "create_time": { + "type": "string" + }, + "description": { + "description": "api中文描述", + "type": "string" + }, + "id": { + "type": "integer" + }, + "method": { + "description": "方法:创建POST(默认)|查看GET|更新PUT|删除DELETE", + "type": "string" + }, + "path": { + "description": "api路径", + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysConfig": { + "type": "object", + "properties": { + "configId": { + "type": "integer" + }, + "configKey": { + "type": "string" + }, + "configName": { + "type": "string" + }, + "configType": { + "type": "string" + }, + "configValue": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "isFrontend": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, "entity.SysDept": { "type": "object", "properties": { @@ -771,39 +4048,383 @@ var doc = `{ "type": "integer" }, "deptName": { - "description": "部门名称", "type": "string" }, "deptPath": { "type": "string" }, "email": { - "description": "邮箱", "type": "string" }, "leader": { - "description": "负责人", - "type": "integer" - }, - "params": { + "description": "userId", "type": "string" }, "parentId": { - "description": "上级部门", "type": "integer" }, "phone": { - "description": "手机", "type": "string" }, "sort": { - "description": "排序", "type": "integer" }, "status": { - "description": "状态", + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysDictData": { + "type": "object", + "properties": { + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "cssClass": { + "type": "string" + }, + "dictCode": { "type": "integer" }, + "dictLabel": { + "type": "string" + }, + "dictSort": { + "type": "integer" + }, + "dictType": { + "type": "string" + }, + "dictValue": { + "type": "string" + }, + "isDefault": { + "type": "string" + }, + "listClass": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysDictType": { + "type": "object", + "properties": { + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "dictId": { + "type": "integer" + }, + "dictName": { + "type": "string" + }, + "dictType": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysJob": { + "type": "object", + "properties": { + "args": { + "description": "目标参数", + "type": "string" + }, + "concurrent": { + "description": "是否并发", + "type": "string" + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "cronExpression": { + "description": "cron表达式", + "type": "string" + }, + "entryId": { + "description": "job启动时返回的id", + "type": "integer" + }, + "invokeTarget": { + "description": "调用目标", + "type": "string" + }, + "jobGroup": { + "description": "任务分组", + "type": "string" + }, + "jobId": { + "description": "编码", + "type": "integer" + }, + "jobName": { + "description": "名称", + "type": "string" + }, + "jobType": { + "description": "任务类型", + "type": "string" + }, + "misfirePolicy": { + "description": "执行策略", + "type": "string" + }, + "status": { + "description": "状态", + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysMenu": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/definitions/entity.SysMenu" + } + }, + "component": { + "description": "组件路径", + "type": "string" + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "isAffix": { + "description": "是否固定在 tagsView 栏上(0是 1否)", + "type": "string" + }, + "isHide": { + "description": "显示状态(0显示 1隐藏)", + "type": "string" + }, + "isIframe": { + "description": "是否为内嵌", + "type": "string" + }, + "isKeepAlive": { + "description": "是否缓存组件状态(0是 1否)", + "type": "string" + }, + "isLink": { + "description": "是否超链接菜单", + "type": "string" + }, + "menuId": { + "type": "integer" + }, + "menuName": { + "type": "string" + }, + "menuType": { + "description": "菜单类型(M目录 C菜单 F按钮)", + "type": "string" + }, + "parentId": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "permission": { + "description": "权限标识", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "sort": { + "type": "integer" + }, + "status": { + "description": "菜单状态(0正常 1停用)", + "type": "string" + }, + "title": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysNotice": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "deptId": { + "type": "integer" + }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "noticeId": { + "type": "integer" + }, + "noticeType": { + "type": "string" + }, + "title": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "userName": { + "type": "string" + } + } + }, + "entity.SysPost": { + "type": "object", + "properties": { + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "postCode": { + "type": "string" + }, + "postId": { + "type": "integer" + }, + "postName": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sort": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysRole": { + "type": "object", + "properties": { + "apiIds": { + "type": "array", + "items": { + "$ref": "#/definitions/casbin.CasbinRule" + } + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "dataScope": { + "type": "string" + }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "flag": { + "type": "string" + }, + "menuIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "remark": { + "type": "string" + }, + "roleId": { + "type": "integer" + }, + "roleKey": { + "type": "string" + }, + "roleName": { + "type": "string" + }, + "roleSort": { + "type": "integer" + }, + "status": { + "type": "string" + }, "updateBy": { "type": "string" }, @@ -837,9 +4458,6 @@ var doc = `{ "description": "昵称", "type": "string" }, - "params": { - "type": "string" - }, "password": { "description": "密码", "type": "string" @@ -852,6 +4470,10 @@ var doc = `{ "description": "职位编码", "type": "integer" }, + "postIds": { + "description": "多岗位", + "type": "string" + }, "remark": { "description": "备注", "type": "string" @@ -860,6 +4482,10 @@ var doc = `{ "description": "角色编码", "type": "integer" }, + "roleIds": { + "description": "多角色", + "type": "string" + }, "salt": { "description": "盐", "type": "string" @@ -869,7 +4495,7 @@ var doc = `{ "type": "string" }, "status": { - "type": "integer" + "type": "string" }, "updateBy": { "type": "string" @@ -886,6 +4512,17 @@ var doc = `{ } } }, + "entity.SysUserPwd": { + "type": "object", + "properties": { + "newPassword": { + "type": "string" + }, + "oldPassword": { + "type": "string" + } + } + }, "form.Login": { "type": "object", "properties": { @@ -906,6 +4543,34 @@ var doc = `{ "type": "string" } } + }, + "from.JobStatus": { + "type": "object", + "properties": { + "jobId": { + "type": "integer" + }, + "status": { + "type": "string" + } + } + }, + "from.SendMail": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "mailId": { + "type": "integer" + }, + "subject": { + "type": "string" + }, + "to": { + "type": "string" + } + } } } }` diff --git a/docs/swagger.json b/docs/swagger.json index 40646b8..73020f8 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -4,24 +4,1805 @@ "contact": {} }, "paths": { - "/api/db/:dbId/c-metadata": { - "get": {} + "/api/api": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "创建基础api", + "parameters": [ + { + "description": "api路径, api中文描述, api组, 方法", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysApi" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/exec-sql": { - "get": {} + "/casbin/getPolicyPathByRoleId": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "获取Api权限列表", + "parameters": [ + { + "type": "string", + "description": "权限id, 权限模型列表", + "name": "roleKey", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/hint-tables": { - "get": {} + "/develop/code/gen/code/{tableId}": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "代码生成", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/sql": { - "get": {}, - "post": {} + "/develop/code/gen/preview/{tableId}": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "代码视图", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/db/:dbId/t-metadata": { - "get": {} + "/develop/code/table": { + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改表结构", + "consumes": [ + "application/json" + ], + "tags": [ + "工具 / 生成工具" + ], + "summary": "修改表结构", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.DevGenTable" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "添加表结构", + "consumes": [ + "application/json" + ], + "tags": [ + "工具 / 生成工具" + ], + "summary": "添加表结构", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } }, - "/api/dbs": { - "get": {} + "/develop/code/table/db/list": { + "get": { + "description": "数据库表列分页列表 / database table column page list", + "tags": [ + "工具 / 生成工具" + ], + "summary": "分页列表数据 / page list data", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + }, + { + "type": "integer", + "description": "pageSize / 页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "pageNum / 页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/info/tableName": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "获取表信息", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/info/{tableId}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "获取表信息", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/list": { + "get": { + "description": "生成表分页列表", + "tags": [ + "工具 / 生成工具" + ], + "summary": "分页列表数据", + "parameters": [ + { + "type": "string", + "description": "tableName / 数据表名称", + "name": "tableName", + "in": "query" + }, + { + "type": "string", + "description": "tableComment / 数据表描述", + "name": "tableComment", + "in": "query" + }, + { + "type": "integer", + "description": "pageSize / 页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "pageIndex / 页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/tableTree": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "工具 / 生成工具" + ], + "summary": "获取树表信息", + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/develop/code/table/{tableId}": { + "delete": { + "description": "删除表结构", + "tags": [ + "工具 / 生成工具" + ], + "summary": "删除表结构", + "parameters": [ + { + "type": "integer", + "description": "tableId", + "name": "tableId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "任务" + ], + "summary": "修改JOB", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysJob" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/changeStatus": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "任务" + ], + "summary": "修改JOB状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/from.JobStatus" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/job": { + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "任务" + ], + "summary": "添加任务", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysJob" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "任务" + ], + "summary": "job列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "jobName", + "name": "jobName", + "in": "query" + }, + { + "type": "string", + "description": "jobGroup", + "name": "jobGroup", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/stop/{jobId}": { + "get": { + "description": "开始Job", + "tags": [ + "任务" + ], + "summary": "开始JOB", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/job/{jobId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "任务" + ], + "summary": "获取一个job", + "parameters": [ + { + "type": "integer", + "description": "jobId", + "name": "jobId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "任务" + ], + "summary": "批量删除JOB", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的infoId", + "name": "infoId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logJob/all": { + "delete": { + "description": "删除数据", + "tags": [ + "任务日志" + ], + "summary": "清空登录日志", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logJob/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "任务日志" + ], + "summary": "Job日志列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "jobGroup", + "name": "jobGroup", + "in": "query" + }, + { + "type": "string", + "description": "name", + "name": "name", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logJob/{logId}": { + "delete": { + "description": "删除数据", + "tags": [ + "任务日志" + ], + "summary": "批量删除登录日志", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的logId", + "name": "logId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "登录日志" + ], + "summary": "修改登录日志", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.LogLogin" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin/all": { + "delete": { + "description": "删除数据", + "tags": [ + "登录日志" + ], + "summary": "清空登录日志", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "登录日志列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "username", + "name": "username", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logLogin/{infoId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "通过编码获取登录日志", + "parameters": [ + { + "type": "integer", + "description": "infoId", + "name": "infoId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "登录日志" + ], + "summary": "批量删除登录日志", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的infoId", + "name": "infoId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logOper/all": { + "delete": { + "description": "删除数据", + "tags": [ + "操作日志" + ], + "summary": "清空操作日志", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logOper/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "操作日志" + ], + "summary": "操作日志列表", + "parameters": [ + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "operName", + "name": "operName", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/log/logOper/{operId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "操作日志" + ], + "summary": "通过编码获取操作日志", + "parameters": [ + { + "type": "integer", + "description": "operId", + "name": "operId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "操作日志" + ], + "summary": "批量删除操作日志", + "parameters": [ + { + "type": "string", + "description": "以逗号(,)分割的operId", + "name": "operId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResEmails" + ], + "summary": "修改ResEmails", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResEmail" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResEmails" + ], + "summary": "添加ResEmails", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResEmail" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email/debugMail": { + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResEmails" + ], + "summary": "测试发邮件", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/from.SendMail" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email/list": { + "get": { + "security": [ + { + "": [] + } + ], + "tags": [ + "ResEmails" + ], + "summary": "ResEmails列表数据", + "parameters": [ + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + }, + { + "type": "string", + "description": "状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "分类", + "name": "category", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/email/{mailId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "ResEmails" + ], + "summary": "获取ResEmails", + "parameters": [ + { + "type": "integer", + "description": "mailId", + "name": "mailId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "ResEmails" + ], + "summary": "删除ResEmails", + "parameters": [ + { + "type": "string", + "description": "mailId", + "name": "mailId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResOsses" + ], + "summary": "修改ResOsses状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResOss" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "ResOsses" + ], + "summary": "添加ResOsses", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.ResOss" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss/list": { + "get": { + "security": [ + { + "": [] + } + ], + "tags": [ + "ResOsses" + ], + "summary": "ResOsses列表数据", + "parameters": [ + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + }, + { + "type": "string", + "description": "状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "分类", + "name": "category", + "in": "query" + }, + { + "type": "string", + "description": "编号", + "name": "ossCode", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss/uploadFile": { + "post": { + "description": "上传文件", + "tags": [ + "ResOsses" + ], + "summary": "上传文件ResOsses", + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/resource/oss/{ossId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "ResOsses" + ], + "summary": "获取ResOsses", + "parameters": [ + { + "type": "integer", + "description": "ossId", + "name": "ossId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "ResOsses" + ], + "summary": "删除ResOsses", + "parameters": [ + { + "type": "string", + "description": "ossId", + "name": "ossId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api": { + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "创建基础api", + "parameters": [ + { + "description": "api路径, api中文描述, api组, 方法", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysApi" + } + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"创建成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api/all": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "获取所有的Api 不分页", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api/list": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "分页获取API列表", + "parameters": [ + { + "type": "string", + "description": "path", + "name": "path", + "in": "query" + }, + { + "type": "string", + "description": "description", + "name": "description", + "in": "query" + }, + { + "type": "string", + "description": "method", + "name": "method", + "in": "query" + }, + { + "type": "string", + "description": "apiGroup", + "name": "apiGroup", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/api/{id}": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "根据id获取api", + "parameters": [ + { + "type": "integer", + "description": "根据id获取api", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "security": [ + { + "X-TOKEN": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "SysApi" + ], + "summary": "删除api", + "responses": { + "200": { + "description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/config": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "配置" + ], + "summary": "配置列表数据", + "parameters": [ + { + "type": "string", + "description": "configName", + "name": "configName", + "in": "query" + }, + { + "type": "string", + "description": "configKey", + "name": "configKey", + "in": "query" + }, + { + "type": "string", + "description": "configType", + "name": "configType", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "配置" + ], + "summary": "修改配置", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysConfig" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "配置" + ], + "summary": "添加配置", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysConfig" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/config/configKey": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "配置" + ], + "summary": "配置列表数据ByKey", + "parameters": [ + { + "type": "string", + "description": "configKey", + "name": "configKey", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/config/{configId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "配置" + ], + "summary": "获取配置", + "parameters": [ + { + "type": "integer", + "description": "configId", + "name": "configId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "配置" + ], + "summary": "删除配置", + "parameters": [ + { + "type": "string", + "description": "configId 多个使用逗号分割", + "name": "configId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } }, "/system/dept": { "put": { @@ -93,28 +1874,6 @@ } } }, - "/system/dept/deptAllList": { - "get": { - "security": [ - { - "": [] - } - ], - "description": "部门列表", - "tags": [ - "部门" - ], - "summary": "所有部门列表数据", - "responses": { - "200": { - "description": "{\"code\": 200, \"data\": [...]}", - "schema": { - "type": "string" - } - } - } - } - }, "/system/dept/deptList": { "get": { "security": [ @@ -141,7 +1900,7 @@ "in": "query" }, { - "type": "string", + "type": "integer", "description": "deptId", "name": "deptId", "in": "query" @@ -183,7 +1942,7 @@ "in": "query" }, { - "type": "string", + "type": "integer", "description": "deptId", "name": "deptId", "in": "query" @@ -199,25 +1958,21 @@ } } }, - "/system/dept/roleDeptTreSelect/{roleId}": { - "delete": { - "description": "获取角色部门树", + "/system/dept/ordinaryDeptLis": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "部门列表", "tags": [ "部门" ], - "summary": "获取角色部门", - "parameters": [ - { - "type": "integer", - "description": "roleId", - "name": "roleId", - "in": "path", - "required": true - } - ], + "summary": "所有部门列表数据", "responses": { "200": { - "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { "type": "string" } @@ -253,9 +2008,7 @@ } } } - } - }, - "/system/dept/{id}": { + }, "delete": { "description": "删除数据", "tags": [ @@ -264,8 +2017,8 @@ "summary": "删除部门", "parameters": [ { - "type": "integer", - "description": "deptId", + "type": "string", + "description": "deptId, 逗号隔开", "name": "deptId", "in": "path", "required": true @@ -281,7 +2034,77 @@ } } }, - "/system/log/logLoginList": { + "/system/dict/data": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "字典" + ], + "summary": "修改字典数据", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictData" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "字典" + ], + "summary": "添加字典数据", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictData" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/data/list": { "get": { "security": [ { @@ -290,20 +2113,14 @@ ], "description": "获取JSON", "tags": [ - "登录日志" + "字典" ], - "summary": "登录日志列表", + "summary": "字典数据列表", "parameters": [ { "type": "string", - "description": "status", - "name": "status", - "in": "query" - }, - { - "type": "string", - "description": "dictCode", - "name": "dictCode", + "description": "dictLabel", + "name": "dictLabel", "in": "query" }, { @@ -312,6 +2129,246 @@ "name": "dictType", "in": "query" }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/data/type": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "字典" + ], + "summary": "字典数据获取", + "parameters": [ + { + "type": "string", + "description": "dictType", + "name": "dictType", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/data/{dictCode}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "字典" + ], + "summary": "获取字典数据", + "parameters": [ + { + "type": "integer", + "description": "dictCode", + "name": "dictCode", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "字典" + ], + "summary": "删除字典数据", + "parameters": [ + { + "type": "string", + "description": "dictCode ", + "name": "dictCode", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/type": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "职位" + ], + "summary": "修改字典类型", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictType" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "字典" + ], + "summary": "添加字典类型", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysDictType" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/type/export": { + "get": { + "description": "导出数据", + "tags": [ + "用户" + ], + "summary": "导出用户", + "parameters": [ + { + "type": "string", + "description": "userName", + "name": "userName", + "in": "query" + }, + { + "type": "string", + "description": "phone", + "name": "phone", + "in": "query" + }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/dict/type/list": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "职位" + ], + "summary": "字典类型列表数据", + "parameters": [ + { + "type": "string", + "description": "DictName", + "name": "dictName", + "in": "query" + }, + { + "type": "string", + "description": "dictType", + "name": "dictName", + "in": "query" + }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, { "type": "integer", "description": "页条数", @@ -335,6 +2392,125 @@ } } }, + "/system/dict/type/{dictId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "字典" + ], + "summary": "获取字典类型", + "parameters": [ + { + "type": "integer", + "description": "dictId", + "name": "dictId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "字典" + ], + "summary": "删除字典类型", + "parameters": [ + { + "type": "string", + "description": "dictId ", + "name": "dictId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/menu": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "菜单" + ], + "summary": "修改菜单", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysMenu" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "菜单" + ], + "summary": "创建菜单", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysMenu" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/menu/menuList": { "get": { "security": [ @@ -356,8 +2532,8 @@ }, { "type": "string", - "description": "visible", - "name": "visible", + "description": "IsHide", + "name": "IsHide", "in": "query" }, { @@ -377,6 +2553,37 @@ } } }, + "/system/menu/menuPaths": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "菜单" + ], + "summary": "获取角色对应的菜单路径数组", + "parameters": [ + { + "type": "string", + "description": "roleKey", + "name": "roleKey", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/menu/menuRole": { "get": { "security": [ @@ -388,7 +2595,7 @@ "tags": [ "菜单" ], - "summary": "根据角色名称获取菜单列表数据(左菜单使用)", + "summary": "登陆成功获取的路由,根据角色名称获取菜单列表数据(左菜单使用)", "responses": { "200": { "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", @@ -410,10 +2617,10 @@ "tags": [ "菜单" ], - "summary": "获取角色的部门树", + "summary": "获取角色的菜单树", "parameters": [ { - "type": "string", + "type": "integer", "description": "roleId", "name": "roleId", "in": "path" @@ -451,21 +2658,54 @@ } } }, - "/system/menu/menuids/{menuName}": { + "/system/menu/{menuId}": { "get": { "security": [ { - "X-TOKEN": [] + "Bearer": [] } ], "description": "获取JSON", "tags": [ "菜单" ], - "summary": "获取角色对应的菜单id数组", + "summary": "Menu列表数据", + "parameters": [ + { + "type": "string", + "description": "menuId", + "name": "menuId", + "in": "path", + "required": true + } + ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "菜单" + ], + "summary": "删除菜单", + "parameters": [ + { + "type": "integer", + "description": "menuId", + "name": "menuId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", "schema": { "type": "string" } @@ -473,7 +2713,103 @@ } } }, - "/system/post/post": { + "/system/notice": { + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "通知" + ], + "summary": "修改通知", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysNotice" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "通知" + ], + "summary": "添加通知", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysNotice" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/notice/{noticeId}": { + "delete": { + "description": "删除数据", + "tags": [ + "通知" + ], + "summary": "删除通知", + "parameters": [ + { + "type": "string", + "description": "noticeId ", + "name": "noticeId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/post": { "get": { "security": [ { @@ -498,12 +2834,6 @@ "name": "postCode", "in": "query" }, - { - "type": "string", - "description": "postId", - "name": "postId", - "in": "query" - }, { "type": "string", "description": "status", @@ -531,6 +2861,280 @@ } } } + }, + "put": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "职位" + ], + "summary": "修改职位", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysPost" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "职位" + ], + "summary": "添加职位", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysPost" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/post/{postId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "职位" + ], + "summary": "获取职位", + "parameters": [ + { + "type": "integer", + "description": "postId", + "name": "postId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "职位" + ], + "summary": "删除职位", + "parameters": [ + { + "type": "string", + "description": "postId ", + "name": "postId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/role": { + "get": { + "security": [ + { + "X-TOKEN": [] + } + ], + "description": "获取JSON", + "tags": [ + "角色/Role" + ], + "summary": "获取Role数据", + "parameters": [ + { + "type": "string", + "description": "roleId", + "name": "roleId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"抱歉未找到相关信息\"}", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "修改用户角色", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "创建角色", + "parameters": [ + { + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/role/changeStatus": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "修改用户角色状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/role/dataScope": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "修改用户角色部门", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysRole" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"修改失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/system/role/rolelist": { @@ -587,7 +3191,33 @@ } } }, - "/system/user/captcha": { + "/system/role/{roleId}": { + "delete": { + "description": "删除数据", + "tags": [ + "角色/Role" + ], + "summary": "删除用户角色", + "parameters": [ + { + "type": "string", + "description": "roleId 多个用,分割", + "name": "roleId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/getCaptcha": { "get": { "produces": [ "application/json" @@ -606,23 +3236,21 @@ } } }, - "/system/user/getInfo": { + "/system/user/getInit": { "get": { "security": [ { "": [] } ], - "produces": [ - "application/json" - ], + "description": "获取JSON", "tags": [ - "Base" + "用户" ], - "summary": "用户统一信息", + "summary": "获取添加用户角色和职位", "responses": { "200": { - "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { "type": "string" } @@ -679,6 +3307,54 @@ } } }, + "/system/user/profile": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "个人中心" + ], + "summary": "获取当前登录用户", + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/profileAvatar": { + "post": { + "description": "修改头像", + "tags": [ + "用户" + ], + "summary": "修改头像", + "parameters": [ + { + "type": "file", + "description": "file", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/user/refreshToken": { "get": { "produces": [ @@ -698,6 +3374,97 @@ } } }, + "/system/user/sysUser": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "修改用户状态", + "parameters": [ + { + "description": "用户数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysUser" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + }, + "post": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "创建用户", + "parameters": [ + { + "description": "用户数据", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysUser" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/sysUser/{userId}": { + "get": { + "security": [ + { + "": [] + } + ], + "description": "获取JSON", + "tags": [ + "用户" + ], + "summary": "获取用户", + "parameters": [ + { + "type": "integer", + "description": "用户编码", + "name": "userId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, "/system/user/sysUserList": { "get": { "security": [ @@ -712,12 +3479,34 @@ "summary": "列表数据", "parameters": [ { - "description": "user", - "name": "user", - "in": "body", - "schema": { - "$ref": "#/definitions/entity.SysUser" - } + "type": "string", + "description": "userName", + "name": "userName", + "in": "query" + }, + { + "type": "string", + "description": "phone", + "name": "phone", + "in": "query" + }, + { + "type": "string", + "description": "status", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageNum", + "in": "query" } ], "responses": { @@ -729,9 +3518,497 @@ } } } + }, + "/system/user/sysuser/{userId}": { + "delete": { + "description": "删除数据", + "tags": [ + "用户" + ], + "summary": "删除用户数据", + "parameters": [ + { + "type": "integer", + "description": "多个id 使用逗号隔开", + "name": "userId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 400, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } + } + }, + "/system/user/updatePwd": { + "post": { + "description": "修改密码", + "tags": [ + "用户" + ], + "summary": "修改密码", + "parameters": [ + { + "description": "pwd", + "name": "pwd", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/entity.SysUserPwd" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "schema": { + "type": "string" + } + } + } + } } }, "definitions": { + "casbin.CasbinRule": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "method": { + "type": "string" + }, + "path": { + "type": "string" + }, + "ptype": { + "type": "string" + }, + "roleKey": { + "type": "string" + }, + "v3": { + "type": "string" + }, + "v4": { + "type": "string" + }, + "v5": { + "type": "string" + } + } + }, + "entity.DevGenTable": { + "type": "object", + "properties": { + "businessName": { + "description": "生成业务名", + "type": "string" + }, + "className": { + "description": "实体类名称", + "type": "string" + }, + "columns": { + "description": "字段信息", + "type": "array", + "items": { + "$ref": "#/definitions/entity.DevGenTableColumn" + } + }, + "create_time": { + "type": "string" + }, + "functionAuthor": { + "description": "生成功能作者", + "type": "string" + }, + "functionName": { + "description": "生成功能名", + "type": "string" + }, + "moduleName": { + "description": "生成模块名", + "type": "string" + }, + "options": { + "description": "其它生成选项", + "type": "string" + }, + "packageName": { + "description": "生成包路径", + "type": "string" + }, + "pkColumn": { + "type": "string" + }, + "pkGoField": { + "type": "string" + }, + "pkJsonField": { + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "tableComment": { + "description": "表描述", + "type": "string" + }, + "tableId": { + "description": "编号", + "type": "integer" + }, + "tableName": { + "description": "表名称", + "type": "string" + }, + "tplCategory": { + "description": "使用的模板(crud单表操作 tree树表操作)", + "type": "string" + }, + "treeCode": { + "type": "string" + }, + "treeName": { + "type": "string" + }, + "treeParentCode": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.DevGenTableColumn": { + "type": "object", + "properties": { + "columnComment": { + "description": "列描述", + "type": "string" + }, + "columnId": { + "description": "编号", + "type": "integer" + }, + "columnKey": { + "type": "string" + }, + "columnName": { + "description": "列名称", + "type": "string" + }, + "columnType": { + "description": "列类型", + "type": "string" + }, + "dictType": { + "description": "字典类型", + "type": "string" + }, + "goField": { + "description": "Go字段名", + "type": "string" + }, + "goType": { + "description": "Go类型", + "type": "string" + }, + "htmlField": { + "description": "html字段名", + "type": "string" + }, + "htmlType": { + "description": "显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)", + "type": "string" + }, + "isEdit": { + "description": "是否编辑字段(1是)", + "type": "string" + }, + "isIncrement": { + "description": "是否自增(1是)", + "type": "string" + }, + "isInsert": { + "description": "是否为插入字段(1是)", + "type": "string" + }, + "isList": { + "description": "是否列表字段(1是)", + "type": "string" + }, + "isPk": { + "description": "是否主键(1是)", + "type": "string" + }, + "isQuery": { + "description": "是否查询字段(1是)", + "type": "string" + }, + "isRequired": { + "description": "是否必填(1是)", + "type": "string" + }, + "jsonField": { + "type": "string" + }, + "linkLabelId": { + "description": "关联表键名", + "type": "string" + }, + "linkLabelName": { + "description": "关联表字段值", + "type": "string" + }, + "linkTableClass": { + "description": "关联表类名", + "type": "string" + }, + "linkTableName": { + "description": "关联表名", + "type": "string" + }, + "linkTablePackage": { + "description": "关联表包名", + "type": "string" + }, + "queryType": { + "description": "查询方式(等于、不等于、大于、小于、范围)", + "type": "string" + }, + "sort": { + "description": "排序", + "type": "integer" + }, + "tableId": { + "description": "归属表编号", + "type": "integer" + }, + "tableName": { + "type": "string" + } + } + }, + "entity.LogLogin": { + "type": "object", + "properties": { + "browser": { + "type": "string" + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "infoId": { + "description": "主键", + "type": "integer" + }, + "ipaddr": { + "type": "string" + }, + "loginLocation": { + "type": "string" + }, + "loginTime": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "os": { + "type": "string" + }, + "params": { + "type": "string" + }, + "platform": { + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "entity.ResEmail": { + "type": "object", + "properties": { + "category": { + "description": "0 163邮箱,1 qq邮箱 2 企业邮箱", + "type": "string" + }, + "create_time": { + "type": "string" + }, + "from": { + "description": "邮箱账号", + "type": "string" + }, + "host": { + "description": "服务器地址", + "type": "string" + }, + "isSsl": { + "description": "是否开启ssl", + "type": "boolean" + }, + "mailId": { + "type": "integer" + }, + "nickname": { + "description": "发件人", + "type": "string" + }, + "port": { + "description": "服务器端口", + "type": "integer" + }, + "secret": { + "description": "邮箱密码", + "type": "string" + }, + "status": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.ResOss": { + "type": "object", + "properties": { + "accessKey": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "bucketName": { + "type": "string" + }, + "category": { + "description": "0 阿里云 1.七牛云 2. 腾讯云", + "type": "string" + }, + "create_time": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "ossCode": { + "type": "string" + }, + "ossId": { + "type": "integer" + }, + "region": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "status": { + "description": "0.启用 1.禁止", + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysApi": { + "type": "object", + "required": [ + "path" + ], + "properties": { + "apiGroup": { + "description": "api组", + "type": "string" + }, + "create_time": { + "type": "string" + }, + "description": { + "description": "api中文描述", + "type": "string" + }, + "id": { + "type": "integer" + }, + "method": { + "description": "方法:创建POST(默认)|查看GET|更新PUT|删除DELETE", + "type": "string" + }, + "path": { + "description": "api路径", + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysConfig": { + "type": "object", + "properties": { + "configId": { + "type": "integer" + }, + "configKey": { + "type": "string" + }, + "configName": { + "type": "string" + }, + "configType": { + "type": "string" + }, + "configValue": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "isFrontend": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, "entity.SysDept": { "type": "object", "properties": { @@ -752,39 +4029,383 @@ "type": "integer" }, "deptName": { - "description": "部门名称", "type": "string" }, "deptPath": { "type": "string" }, "email": { - "description": "邮箱", "type": "string" }, "leader": { - "description": "负责人", - "type": "integer" - }, - "params": { + "description": "userId", "type": "string" }, "parentId": { - "description": "上级部门", "type": "integer" }, "phone": { - "description": "手机", "type": "string" }, "sort": { - "description": "排序", "type": "integer" }, "status": { - "description": "状态", + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysDictData": { + "type": "object", + "properties": { + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "cssClass": { + "type": "string" + }, + "dictCode": { "type": "integer" }, + "dictLabel": { + "type": "string" + }, + "dictSort": { + "type": "integer" + }, + "dictType": { + "type": "string" + }, + "dictValue": { + "type": "string" + }, + "isDefault": { + "type": "string" + }, + "listClass": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysDictType": { + "type": "object", + "properties": { + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "dictId": { + "type": "integer" + }, + "dictName": { + "type": "string" + }, + "dictType": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysJob": { + "type": "object", + "properties": { + "args": { + "description": "目标参数", + "type": "string" + }, + "concurrent": { + "description": "是否并发", + "type": "string" + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "cronExpression": { + "description": "cron表达式", + "type": "string" + }, + "entryId": { + "description": "job启动时返回的id", + "type": "integer" + }, + "invokeTarget": { + "description": "调用目标", + "type": "string" + }, + "jobGroup": { + "description": "任务分组", + "type": "string" + }, + "jobId": { + "description": "编码", + "type": "integer" + }, + "jobName": { + "description": "名称", + "type": "string" + }, + "jobType": { + "description": "任务类型", + "type": "string" + }, + "misfirePolicy": { + "description": "执行策略", + "type": "string" + }, + "status": { + "description": "状态", + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysMenu": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/definitions/entity.SysMenu" + } + }, + "component": { + "description": "组件路径", + "type": "string" + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "isAffix": { + "description": "是否固定在 tagsView 栏上(0是 1否)", + "type": "string" + }, + "isHide": { + "description": "显示状态(0显示 1隐藏)", + "type": "string" + }, + "isIframe": { + "description": "是否为内嵌", + "type": "string" + }, + "isKeepAlive": { + "description": "是否缓存组件状态(0是 1否)", + "type": "string" + }, + "isLink": { + "description": "是否超链接菜单", + "type": "string" + }, + "menuId": { + "type": "integer" + }, + "menuName": { + "type": "string" + }, + "menuType": { + "description": "菜单类型(M目录 C菜单 F按钮)", + "type": "string" + }, + "parentId": { + "type": "integer" + }, + "path": { + "type": "string" + }, + "permission": { + "description": "权限标识", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "sort": { + "type": "integer" + }, + "status": { + "description": "菜单状态(0正常 1停用)", + "type": "string" + }, + "title": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysNotice": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "deptId": { + "type": "integer" + }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "noticeId": { + "type": "integer" + }, + "noticeType": { + "type": "string" + }, + "title": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "userName": { + "type": "string" + } + } + }, + "entity.SysPost": { + "type": "object", + "properties": { + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "postCode": { + "type": "string" + }, + "postId": { + "type": "integer" + }, + "postName": { + "type": "string" + }, + "remark": { + "type": "string" + }, + "sort": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "entity.SysRole": { + "type": "object", + "properties": { + "apiIds": { + "type": "array", + "items": { + "$ref": "#/definitions/casbin.CasbinRule" + } + }, + "createBy": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "dataScope": { + "type": "string" + }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "flag": { + "type": "string" + }, + "menuIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "remark": { + "type": "string" + }, + "roleId": { + "type": "integer" + }, + "roleKey": { + "type": "string" + }, + "roleName": { + "type": "string" + }, + "roleSort": { + "type": "integer" + }, + "status": { + "type": "string" + }, "updateBy": { "type": "string" }, @@ -818,9 +4439,6 @@ "description": "昵称", "type": "string" }, - "params": { - "type": "string" - }, "password": { "description": "密码", "type": "string" @@ -833,6 +4451,10 @@ "description": "职位编码", "type": "integer" }, + "postIds": { + "description": "多岗位", + "type": "string" + }, "remark": { "description": "备注", "type": "string" @@ -841,6 +4463,10 @@ "description": "角色编码", "type": "integer" }, + "roleIds": { + "description": "多角色", + "type": "string" + }, "salt": { "description": "盐", "type": "string" @@ -850,7 +4476,7 @@ "type": "string" }, "status": { - "type": "integer" + "type": "string" }, "updateBy": { "type": "string" @@ -867,6 +4493,17 @@ } } }, + "entity.SysUserPwd": { + "type": "object", + "properties": { + "newPassword": { + "type": "string" + }, + "oldPassword": { + "type": "string" + } + } + }, "form.Login": { "type": "object", "properties": { @@ -887,6 +4524,34 @@ "type": "string" } } + }, + "from.JobStatus": { + "type": "object", + "properties": { + "jobId": { + "type": "integer" + }, + "status": { + "type": "string" + } + } + }, + "from.SendMail": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "mailId": { + "type": "integer" + }, + "subject": { + "type": "string" + }, + "to": { + "type": "string" + } + } } } } \ No newline at end of file diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 29ccd16..f5d37cc 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1,4 +1,308 @@ definitions: + casbin.CasbinRule: + properties: + id: + type: integer + method: + type: string + path: + type: string + ptype: + type: string + roleKey: + type: string + v3: + type: string + v4: + type: string + v5: + type: string + type: object + entity.DevGenTable: + properties: + businessName: + description: 生成业务名 + type: string + className: + description: 实体类名称 + type: string + columns: + description: 字段信息 + items: + $ref: '#/definitions/entity.DevGenTableColumn' + type: array + create_time: + type: string + functionAuthor: + description: 生成功能作者 + type: string + functionName: + description: 生成功能名 + type: string + moduleName: + description: 生成模块名 + type: string + options: + description: 其它生成选项 + type: string + packageName: + description: 生成包路径 + type: string + pkColumn: + type: string + pkGoField: + type: string + pkJsonField: + type: string + remark: + description: 备注 + type: string + tableComment: + description: 表描述 + type: string + tableId: + description: 编号 + type: integer + tableName: + description: 表名称 + type: string + tplCategory: + description: 使用的模板(crud单表操作 tree树表操作) + type: string + treeCode: + type: string + treeName: + type: string + treeParentCode: + type: string + update_time: + type: string + type: object + entity.DevGenTableColumn: + properties: + columnComment: + description: 列描述 + type: string + columnId: + description: 编号 + type: integer + columnKey: + type: string + columnName: + description: 列名称 + type: string + columnType: + description: 列类型 + type: string + dictType: + description: 字典类型 + type: string + goField: + description: Go字段名 + type: string + goType: + description: Go类型 + type: string + htmlField: + description: html字段名 + type: string + htmlType: + description: 显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件) + type: string + isEdit: + description: 是否编辑字段(1是) + type: string + isIncrement: + description: 是否自增(1是) + type: string + isInsert: + description: 是否为插入字段(1是) + type: string + isList: + description: 是否列表字段(1是) + type: string + isPk: + description: 是否主键(1是) + type: string + isQuery: + description: 是否查询字段(1是) + type: string + isRequired: + description: 是否必填(1是) + type: string + jsonField: + type: string + linkLabelId: + description: 关联表键名 + type: string + linkLabelName: + description: 关联表字段值 + type: string + linkTableClass: + description: 关联表类名 + type: string + linkTableName: + description: 关联表名 + type: string + linkTablePackage: + description: 关联表包名 + type: string + queryType: + description: 查询方式(等于、不等于、大于、小于、范围) + type: string + sort: + description: 排序 + type: integer + tableId: + description: 归属表编号 + type: integer + tableName: + type: string + type: object + entity.LogLogin: + properties: + browser: + type: string + create_time: + type: string + createBy: + type: string + infoId: + description: 主键 + type: integer + ipaddr: + type: string + loginLocation: + type: string + loginTime: + type: string + msg: + type: string + os: + type: string + params: + type: string + platform: + type: string + remark: + description: 备注 + type: string + status: + type: string + update_time: + type: string + updateBy: + type: string + username: + type: string + type: object + entity.ResEmail: + properties: + category: + description: 0 163邮箱,1 qq邮箱 2 企业邮箱 + type: string + create_time: + type: string + from: + description: 邮箱账号 + type: string + host: + description: 服务器地址 + type: string + isSsl: + description: 是否开启ssl + type: boolean + mailId: + type: integer + nickname: + description: 发件人 + type: string + port: + description: 服务器端口 + type: integer + secret: + description: 邮箱密码 + type: string + status: + type: string + update_time: + type: string + type: object + entity.ResOss: + properties: + accessKey: + type: string + appId: + type: string + bucketName: + type: string + category: + description: 0 阿里云 1.七牛云 2. 腾讯云 + type: string + create_time: + type: string + endpoint: + type: string + ossCode: + type: string + ossId: + type: integer + region: + type: string + remark: + type: string + secretKey: + type: string + status: + description: 0.启用 1.禁止 + type: string + update_time: + type: string + type: object + entity.SysApi: + properties: + apiGroup: + description: api组 + type: string + create_time: + type: string + description: + description: api中文描述 + type: string + id: + type: integer + method: + description: 方法:创建POST(默认)|查看GET|更新PUT|删除DELETE + type: string + path: + description: api路径 + type: string + update_time: + type: string + required: + - path + type: object + entity.SysConfig: + properties: + configId: + type: integer + configKey: + type: string + configName: + type: string + configType: + type: string + configValue: + type: string + create_time: + type: string + isFrontend: + type: string + remark: + type: string + update_time: + type: string + type: object entity.SysDept: properties: children: @@ -13,30 +317,262 @@ definitions: description: 部门编码 type: integer deptName: - description: 部门名称 type: string deptPath: type: string email: - description: 邮箱 type: string leader: - description: 负责人 - type: integer - params: + description: userId type: string parentId: - description: 上级部门 type: integer phone: - description: 手机 type: string sort: - description: 排序 type: integer status: - description: 状态 + type: string + update_time: + type: string + updateBy: + type: string + type: object + entity.SysDictData: + properties: + create_time: + type: string + createBy: + type: string + cssClass: + type: string + dictCode: type: integer + dictLabel: + type: string + dictSort: + type: integer + dictType: + type: string + dictValue: + type: string + isDefault: + type: string + listClass: + type: string + remark: + type: string + status: + type: string + update_time: + type: string + updateBy: + type: string + type: object + entity.SysDictType: + properties: + create_time: + type: string + createBy: + type: string + dictId: + type: integer + dictName: + type: string + dictType: + type: string + remark: + type: string + status: + type: string + update_time: + type: string + updateBy: + type: string + type: object + entity.SysJob: + properties: + args: + description: 目标参数 + type: string + concurrent: + description: 是否并发 + type: string + create_time: + type: string + createBy: + type: string + cronExpression: + description: cron表达式 + type: string + entryId: + description: job启动时返回的id + type: integer + invokeTarget: + description: 调用目标 + type: string + jobGroup: + description: 任务分组 + type: string + jobId: + description: 编码 + type: integer + jobName: + description: 名称 + type: string + jobType: + description: 任务类型 + type: string + misfirePolicy: + description: 执行策略 + type: string + status: + description: 状态 + type: string + update_time: + type: string + updateBy: + type: string + type: object + entity.SysMenu: + properties: + children: + items: + $ref: '#/definitions/entity.SysMenu' + type: array + component: + description: 组件路径 + type: string + create_time: + type: string + createBy: + type: string + icon: + type: string + isAffix: + description: 是否固定在 tagsView 栏上(0是 1否) + type: string + isHide: + description: 显示状态(0显示 1隐藏) + type: string + isIframe: + description: 是否为内嵌 + type: string + isKeepAlive: + description: 是否缓存组件状态(0是 1否) + type: string + isLink: + description: 是否超链接菜单 + type: string + menuId: + type: integer + menuName: + type: string + menuType: + description: 菜单类型(M目录 C菜单 F按钮) + type: string + parentId: + type: integer + path: + type: string + permission: + description: 权限标识 + type: string + remark: + description: 备注 + type: string + sort: + type: integer + status: + description: 菜单状态(0正常 1停用) + type: string + title: + type: string + update_time: + type: string + updateBy: + type: string + type: object + entity.SysNotice: + properties: + content: + type: string + create_time: + type: string + deptId: + type: integer + deptIds: + items: + type: integer + type: array + noticeId: + type: integer + noticeType: + type: string + title: + type: string + update_time: + type: string + userName: + type: string + type: object + entity.SysPost: + properties: + create_time: + type: string + createBy: + type: string + postCode: + type: string + postId: + type: integer + postName: + type: string + remark: + type: string + sort: + type: integer + status: + type: string + update_time: + type: string + updateBy: + type: string + type: object + entity.SysRole: + properties: + apiIds: + items: + $ref: '#/definitions/casbin.CasbinRule' + type: array + create_time: + type: string + createBy: + type: string + dataScope: + type: string + deptIds: + items: + type: integer + type: array + flag: + type: string + menuIds: + items: + type: integer + type: array + remark: + type: string + roleId: + type: integer + roleKey: + type: string + roleName: + type: string + roleSort: + type: integer + status: + type: string update_time: type: string updateBy: @@ -60,8 +596,6 @@ definitions: nickName: description: 昵称 type: string - params: - type: string password: description: 密码 type: string @@ -71,12 +605,18 @@ definitions: postId: description: 职位编码 type: integer + postIds: + description: 多岗位 + type: string remark: description: 备注 type: string roleId: description: 角色编码 type: integer + roleIds: + description: 多角色 + type: string salt: description: 盐 type: string @@ -84,7 +624,7 @@ definitions: description: 性别 type: string status: - type: integer + type: string update_time: type: string updateBy: @@ -95,6 +635,13 @@ definitions: username: type: string type: object + entity.SysUserPwd: + properties: + newPassword: + type: string + oldPassword: + type: string + type: object form.Login: properties: captcha: @@ -110,22 +657,1149 @@ definitions: description: 用户名 type: string type: object + from.JobStatus: + properties: + jobId: + type: integer + status: + type: string + type: object + from.SendMail: + properties: + body: + type: string + mailId: + type: integer + subject: + type: string + to: + type: string + type: object info: contact: {} paths: - /api/db/:dbId/c-metadata: - get: {} - /api/db/:dbId/exec-sql: - get: {} - /api/db/:dbId/hint-tables: - get: {} - /api/db/:dbId/sql: - get: {} - post: {} - /api/db/:dbId/t-metadata: - get: {} - /api/dbs: - get: {} + /api/api: + put: + consumes: + - application/json + parameters: + - description: api路径, api中文描述, api组, 方法 + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysApi' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"修改成功"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 创建基础api + tags: + - SysApi + /casbin/getPolicyPathByRoleId: + get: + consumes: + - application/json + parameters: + - description: 权限id, 权限模型列表 + in: query + name: roleKey + required: true + type: string + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 获取Api权限列表 + tags: + - SysApi + /develop/code/gen/code/{tableId}: + get: + description: 获取JSON + parameters: + - description: tableId + in: path + name: tableId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 代码生成 + tags: + - 工具 / 生成工具 + /develop/code/gen/preview/{tableId}: + get: + description: 获取JSON + parameters: + - description: tableId + in: path + name: tableId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 代码视图 + tags: + - 工具 / 生成工具 + /develop/code/table: + post: + consumes: + - application/json + description: 添加表结构 + parameters: + - description: tableName / 数据表名称 + in: query + name: tableName + type: string + responses: + "200": + description: '{"code": -1, "message": "添加失败"}' + schema: + type: string + security: + - Bearer: [] + summary: 添加表结构 + tags: + - 工具 / 生成工具 + put: + consumes: + - application/json + description: 修改表结构 + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.DevGenTable' + responses: + "200": + description: '{"code": -1, "message": "添加失败"}' + schema: + type: string + security: + - Bearer: [] + summary: 修改表结构 + tags: + - 工具 / 生成工具 + /develop/code/table/{tableId}: + delete: + description: 删除表结构 + parameters: + - description: tableId + in: path + name: tableId + required: true + type: integer + responses: + "200": + description: '{"code": -1, "message": "删除失败"}' + schema: + type: string + summary: 删除表结构 + tags: + - 工具 / 生成工具 + /develop/code/table/db/list: + get: + description: 数据库表列分页列表 / database table column page list + parameters: + - description: tableName / 数据表名称 + in: query + name: tableName + type: string + - description: pageSize / 页条数 + in: query + name: pageSize + type: integer + - description: pageNum / 页码 + in: query + name: pageNum + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + summary: 分页列表数据 / page list data + tags: + - 工具 / 生成工具 + /develop/code/table/info/{tableId}: + get: + description: 获取JSON + parameters: + - description: tableId + in: path + name: tableId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - Bearer: [] + summary: 获取表信息 + tags: + - 工具 / 生成工具 + /develop/code/table/info/tableName: + get: + description: 获取JSON + parameters: + - description: tableName / 数据表名称 + in: query + name: tableName + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 获取表信息 + tags: + - 工具 / 生成工具 + /develop/code/table/list: + get: + description: 生成表分页列表 + parameters: + - description: tableName / 数据表名称 + in: query + name: tableName + type: string + - description: tableComment / 数据表描述 + in: query + name: tableComment + type: string + - description: pageSize / 页条数 + in: query + name: pageSize + type: integer + - description: pageIndex / 页码 + in: query + name: pageIndex + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + summary: 分页列表数据 + tags: + - 工具 / 生成工具 + /develop/code/table/tableTree: + get: + description: 获取JSON + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 获取树表信息 + tags: + - 工具 / 生成工具 + /job: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysJob' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改JOB + tags: + - 任务 + /job/{jobId}: + delete: + description: 删除数据 + parameters: + - description: 以逗号(,)分割的infoId + in: path + name: infoId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 批量删除JOB + tags: + - 任务 + get: + description: 获取JSON + parameters: + - description: jobId + in: path + name: jobId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取一个job + tags: + - 任务 + /job/changeStatus: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/from.JobStatus' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改JOB状态 + tags: + - 任务 + /job/job: + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysJob' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 添加任务 + tags: + - 任务 + /job/list: + get: + description: 获取JSON + parameters: + - description: status + in: query + name: status + type: string + - description: jobName + in: query + name: jobName + type: string + - description: jobGroup + in: query + name: jobGroup + type: string + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: job列表 + tags: + - 任务 + /job/stop/{jobId}: + get: + description: 开始Job + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 开始JOB + tags: + - 任务 + /log/logJob/{logId}: + delete: + description: 删除数据 + parameters: + - description: 以逗号(,)分割的logId + in: path + name: logId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 批量删除登录日志 + tags: + - 任务日志 + /log/logJob/all: + delete: + description: 删除数据 + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 清空登录日志 + tags: + - 任务日志 + /log/logJob/list: + get: + description: 获取JSON + parameters: + - description: status + in: query + name: status + type: string + - description: jobGroup + in: query + name: jobGroup + type: string + - description: name + in: query + name: name + type: string + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: Job日志列表 + tags: + - 任务日志 + /log/logLogin: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.LogLogin' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改登录日志 + tags: + - 登录日志 + /log/logLogin/{infoId}: + delete: + description: 删除数据 + parameters: + - description: 以逗号(,)分割的infoId + in: path + name: infoId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 批量删除登录日志 + tags: + - 登录日志 + get: + description: 获取JSON + parameters: + - description: infoId + in: path + name: infoId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 通过编码获取登录日志 + tags: + - 登录日志 + /log/logLogin/all: + delete: + description: 删除数据 + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 清空登录日志 + tags: + - 登录日志 + /log/logLogin/list: + get: + description: 获取JSON + parameters: + - description: status + in: query + name: status + type: string + - description: username + in: query + name: username + type: string + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 登录日志列表 + tags: + - 登录日志 + /log/logOper/{operId}: + delete: + description: 删除数据 + parameters: + - description: 以逗号(,)分割的operId + in: path + name: operId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 批量删除操作日志 + tags: + - 操作日志 + get: + description: 获取JSON + parameters: + - description: operId + in: path + name: operId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 通过编码获取操作日志 + tags: + - 操作日志 + /log/logOper/all: + delete: + description: 删除数据 + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 清空操作日志 + tags: + - 操作日志 + /log/logOper/list: + get: + description: 获取JSON + parameters: + - description: status + in: query + name: status + type: string + - description: operName + in: query + name: operName + type: string + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 操作日志列表 + tags: + - 操作日志 + /resource/email: + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.ResEmail' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 添加ResEmails + tags: + - ResEmails + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.ResEmail' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改ResEmails + tags: + - ResEmails + /resource/email/{mailId}: + delete: + description: 删除数据 + parameters: + - description: mailId + in: path + name: mailId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除ResEmails + tags: + - ResEmails + get: + description: 获取JSON + parameters: + - description: mailId + in: path + name: mailId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取ResEmails + tags: + - ResEmails + /resource/email/debugMail: + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/from.SendMail' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 测试发邮件 + tags: + - ResEmails + /resource/email/list: + get: + parameters: + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + - description: 状态 + in: query + name: status + type: string + - description: 分类 + in: query + name: category + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: ResEmails列表数据 + tags: + - ResEmails + /resource/oss: + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.ResOss' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 添加ResOsses + tags: + - ResOsses + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.ResOss' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改ResOsses状态 + tags: + - ResOsses + /resource/oss/{ossId}: + delete: + description: 删除数据 + parameters: + - description: ossId + in: path + name: ossId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除ResOsses + tags: + - ResOsses + get: + description: 获取JSON + parameters: + - description: ossId + in: path + name: ossId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取ResOsses + tags: + - ResOsses + /resource/oss/list: + get: + parameters: + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + - description: 状态 + in: query + name: status + type: string + - description: 分类 + in: query + name: category + type: string + - description: 编号 + in: query + name: ossCode + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: ResOsses列表数据 + tags: + - ResOsses + /resource/oss/uploadFile: + post: + description: 上传文件 + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 上传文件ResOsses + tags: + - ResOsses + /system/api: + post: + consumes: + - application/json + parameters: + - description: api路径, api中文描述, api组, 方法 + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysApi' + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"创建成功"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 创建基础api + tags: + - SysApi + /system/api/{id}: + delete: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"删除成功"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 删除api + tags: + - SysApi + get: + consumes: + - application/json + parameters: + - description: 根据id获取api + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 根据id获取api + tags: + - SysApi + /system/api/all: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 获取所有的Api 不分页 + tags: + - SysApi + /system/api/list: + get: + consumes: + - application/json + parameters: + - description: path + in: query + name: path + type: string + - description: description + in: query + name: description + type: string + - description: method + in: query + name: method + type: string + - description: apiGroup + in: query + name: apiGroup + type: string + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + produces: + - application/json + responses: + "200": + description: '{"success":true,"data":{},"msg":"获取成功"}' + schema: + type: string + security: + - ApiKeyAuth: [] + summary: 分页获取API列表 + tags: + - SysApi + /system/config: + get: + description: 获取JSON + parameters: + - description: configName + in: query + name: configName + type: string + - description: configKey + in: query + name: configKey + type: string + - description: configType + in: query + name: configType + type: string + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 配置列表数据 + tags: + - 配置 + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysConfig' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 添加配置 + tags: + - 配置 + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysConfig' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改配置 + tags: + - 配置 + /system/config/{configId}: + delete: + description: 删除数据 + parameters: + - description: configId 多个使用逗号分割 + in: path + name: configId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除配置 + tags: + - 配置 + get: + description: 获取JSON + parameters: + - description: configId + in: path + name: configId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取配置 + tags: + - 配置 + /system/config/configKey: + get: + description: 获取JSON + parameters: + - description: configKey + in: query + name: configKey + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 配置列表数据ByKey + tags: + - 配置 /system/dept: post: consumes: @@ -170,6 +1844,22 @@ paths: tags: - 部门 /system/dept/{deptId}: + delete: + description: 删除数据 + parameters: + - description: deptId, 逗号隔开 + in: path + name: deptId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除部门 + tags: + - 部门 get: description: 获取JSON parameters: @@ -187,36 +1877,6 @@ paths: summary: 部门数据 tags: - 部门 - /system/dept/{id}: - delete: - description: 删除数据 - parameters: - - description: deptId - in: path - name: deptId - required: true - type: integer - responses: - "200": - description: '{"code": 400, "message": "删除失败"}' - schema: - type: string - summary: 删除部门 - tags: - - 部门 - /system/dept/deptAllList: - get: - description: 部门列表 - responses: - "200": - description: '{"code": 200, "data": [...]}' - schema: - type: string - security: - - "": [] - summary: 所有部门列表数据 - tags: - - 部门 /system/dept/deptList: get: description: 分页列表 @@ -232,7 +1892,7 @@ paths: - description: deptId in: query name: deptId - type: string + type: integer responses: "200": description: '{"code": 200, "data": [...]}' @@ -258,7 +1918,7 @@ paths: - description: deptId in: query name: deptId - type: string + type: integer responses: "200": description: '{"code": 200, "data": [...]}' @@ -269,39 +1929,259 @@ paths: summary: 所有部门树数据 tags: - 部门 - /system/dept/roleDeptTreSelect/{roleId}: - delete: - description: 获取角色部门树 + /system/dept/ordinaryDeptLis: + get: + description: 部门列表 + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 所有部门列表数据 + tags: + - 部门 + /system/dict/data: + post: + consumes: + - application/json + description: 获取JSON parameters: - - description: roleId - in: path - name: roleId + - description: data + in: body + name: data required: true - type: integer + schema: + $ref: '#/definitions/entity.SysDictData' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 添加字典数据 + tags: + - 字典 + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysDictData' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改字典数据 + tags: + - 字典 + /system/dict/data/{dictCode}: + delete: + description: 删除数据 + parameters: + - description: 'dictCode ' + in: path + name: dictCode + required: true + type: string responses: "200": description: '{"code": 400, "message": "删除失败"}' schema: type: string - summary: 获取角色部门 + summary: 删除字典数据 tags: - - 部门 - /system/log/logLoginList: + - 字典 get: description: 获取JSON parameters: - - description: status - in: query - name: status - type: string - description: dictCode - in: query + in: path name: dictCode + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取字典数据 + tags: + - 字典 + /system/dict/data/list: + get: + description: 获取JSON + parameters: + - description: dictLabel + in: query + name: dictLabel type: string - description: dictType in: query name: dictType type: string + - description: status + in: query + name: status + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 字典数据列表 + tags: + - 字典 + /system/dict/data/type: + get: + description: 获取JSON + parameters: + - description: dictType + in: path + name: dictType + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 字典数据获取 + tags: + - 字典 + /system/dict/type: + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysDictType' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 添加字典类型 + tags: + - 字典 + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysDictType' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改字典类型 + tags: + - 职位 + /system/dict/type/{dictId}: + delete: + description: 删除数据 + parameters: + - description: 'dictId ' + in: path + name: dictId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除字典类型 + tags: + - 字典 + get: + description: 获取JSON + parameters: + - description: dictId + in: path + name: dictId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取字典类型 + tags: + - 字典 + /system/dict/type/export: + get: + description: 导出数据 + parameters: + - description: userName + in: query + name: userName + type: string + - description: phone + in: query + name: phone + type: string + - description: status + in: query + name: status + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 导出用户 + tags: + - 用户 + /system/dict/type/list: + get: + description: 获取JSON + parameters: + - description: DictName + in: query + name: dictName + type: string + - description: dictType + in: query + name: dictName + type: string + - description: status + in: query + name: status + type: string - description: 页条数 in: query name: pageSize @@ -317,9 +2197,83 @@ paths: type: string security: - "": [] - summary: 登录日志列表 + summary: 字典类型列表数据 tags: - - 登录日志 + - 职位 + /system/menu: + post: + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysMenu' + responses: + "200": + description: '{"code": -1, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 创建菜单 + tags: + - 菜单 + put: + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysMenu' + responses: + "200": + description: '{"code": -1, "message": "修改失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改菜单 + tags: + - 菜单 + /system/menu/{menuId}: + delete: + description: 删除数据 + parameters: + - description: menuId + in: path + name: menuId + required: true + type: integer + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除菜单 + tags: + - 菜单 + get: + description: 获取JSON + parameters: + - description: menuId + in: path + name: menuId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "抱歉未找到相关信息"}' + schema: + type: string + security: + - Bearer: [] + summary: Menu列表数据 + tags: + - 菜单 /system/menu/menuList: get: description: 获取JSON @@ -328,9 +2282,9 @@ paths: in: query name: menuName type: string - - description: visible + - description: IsHide in: query - name: visible + name: IsHide type: string - description: title in: query @@ -346,6 +2300,25 @@ paths: summary: Menu列表数据 tags: - 菜单 + /system/menu/menuPaths: + get: + description: 获取JSON + parameters: + - description: roleKey + in: query + name: roleKey + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "抱歉未找到相关信息"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 获取角色对应的菜单路径数组 + tags: + - 菜单 /system/menu/menuRole: get: description: 获取JSON @@ -356,7 +2329,7 @@ paths: type: string security: - X-TOKEN: [] - summary: 根据角色名称获取菜单列表数据(左菜单使用) + summary: 登陆成功获取的路由,根据角色名称获取菜单列表数据(左菜单使用) tags: - 菜单 /system/menu/menuTreRoleSelect/{roleId}: @@ -366,7 +2339,7 @@ paths: - description: roleId in: path name: roleId - type: string + type: integer responses: "200": description: '{"code": 400, "message": "抱歉未找到相关信息"}' @@ -374,7 +2347,7 @@ paths: type: string security: - X-TOKEN: [] - summary: 获取角色的部门树 + summary: 获取角色的菜单树 tags: - 菜单 /system/menu/menuTreSelect: @@ -390,20 +2363,67 @@ paths: summary: 获取菜单树 tags: - 菜单 - /system/menu/menuids/{menuName}: - get: + /system/notice: + post: + consumes: + - application/json description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysNotice' responses: "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + description: '{"code": 400, "message": "添加失败"}' schema: type: string security: - X-TOKEN: [] - summary: 获取角色对应的菜单id数组 + summary: 添加通知 tags: - - 菜单 - /system/post/post: + - 通知 + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysNotice' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改通知 + tags: + - 通知 + /system/notice/{noticeId}: + delete: + description: 删除数据 + parameters: + - description: 'noticeId ' + in: path + name: noticeId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除通知 + tags: + - 通知 + /system/post: get: description: 获取JSON parameters: @@ -415,10 +2435,6 @@ paths: in: query name: postCode type: string - - description: postId - in: query - name: postId - type: string - description: status in: query name: status @@ -441,6 +2457,197 @@ paths: summary: 职位列表数据 tags: - 职位 + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysPost' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 添加职位 + tags: + - 职位 + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysPost' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 修改职位 + tags: + - 职位 + /system/post/{postId}: + delete: + description: 删除数据 + parameters: + - description: 'postId ' + in: path + name: postId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除职位 + tags: + - 职位 + get: + description: 获取JSON + parameters: + - description: postId + in: path + name: postId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取职位 + tags: + - 职位 + /system/role: + get: + description: 获取JSON + parameters: + - description: roleId + in: path + name: roleId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "抱歉未找到相关信息"}' + schema: + type: string + security: + - X-TOKEN: [] + summary: 获取Role数据 + tags: + - 角色/Role + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: data + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysRole' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + summary: 创建角色 + tags: + - 角色/Role + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysRole' + responses: + "200": + description: '{"code": 400, "message": "修改失败"}' + schema: + type: string + summary: 修改用户角色 + tags: + - 角色/Role + /system/role/{roleId}: + delete: + description: 删除数据 + parameters: + - description: roleId 多个用,分割 + in: path + name: roleId + required: true + type: string + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除用户角色 + tags: + - 角色/Role + /system/role/changeStatus: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysRole' + responses: + "200": + description: '{"code": 400, "message": "修改失败"}' + schema: + type: string + summary: 修改用户角色状态 + tags: + - 角色/Role + /system/role/dataScope: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysRole' + responses: + "200": + description: '{"code": 400, "message": "修改失败"}' + schema: + type: string + summary: 修改用户角色部门 + tags: + - 角色/Role /system/role/rolelist: get: description: Get JSON @@ -475,7 +2682,7 @@ paths: summary: 角色列表数据 tags: - 角色 - /system/user/captcha: + /system/user/getCaptcha: get: produces: - application/json @@ -487,20 +2694,19 @@ paths: summary: 获取验证码 tags: - Base - /system/user/getInfo: + /system/user/getInit: get: - produces: - - application/json + description: 获取JSON responses: "200": - description: '{"success":true,"data":{},"msg":"登陆成功"}' + description: '{"code": 200, "data": [...]}' schema: type: string security: - "": [] - summary: 用户统一信息 + summary: 获取添加用户角色和职位 tags: - - Base + - 用户 /system/user/login: post: parameters: @@ -532,6 +2738,36 @@ paths: summary: 退出登录 tags: - Base + /system/user/profile: + get: + description: 获取JSON + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取当前登录用户 + tags: + - 个人中心 + /system/user/profileAvatar: + post: + description: 修改头像 + parameters: + - description: file + in: formData + name: file + required: true + type: file + responses: + "200": + description: '{"code": -1, "message": "添加失败"}' + schema: + type: string + summary: 修改头像 + tags: + - 用户 /system/user/refreshToken: get: produces: @@ -544,15 +2780,88 @@ paths: summary: 刷新token tags: - Base + /system/user/sysUser: + post: + consumes: + - application/json + description: 获取JSON + parameters: + - description: 用户数据 + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysUser' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + summary: 创建用户 + tags: + - 用户 + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: 用户数据 + in: body + name: data + required: true + schema: + $ref: '#/definitions/entity.SysUser' + responses: + "200": + description: '{"code": 400, "message": "添加失败"}' + schema: + type: string + summary: 修改用户状态 + tags: + - 用户 + /system/user/sysUser/{userId}: + get: + description: 获取JSON + parameters: + - description: 用户编码 + in: path + name: userId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - "": [] + summary: 获取用户 + tags: + - 用户 /system/user/sysUserList: get: description: 获取JSON parameters: - - description: user - in: body - name: user - schema: - $ref: '#/definitions/entity.SysUser' + - description: userName + in: query + name: userName + type: string + - description: phone + in: query + name: phone + type: string + - description: status + in: query + name: status + type: string + - description: 页条数 + in: query + name: pageSize + type: integer + - description: 页码 + in: query + name: pageNum + type: integer responses: "200": description: '{"code": -1, "message": "抱歉未找到相关信息"}' @@ -563,4 +2872,39 @@ paths: summary: 列表数据 tags: - 用户 + /system/user/sysuser/{userId}: + delete: + description: 删除数据 + parameters: + - description: 多个id 使用逗号隔开 + in: path + name: userId + required: true + type: integer + responses: + "200": + description: '{"code": 400, "message": "删除失败"}' + schema: + type: string + summary: 删除用户数据 + tags: + - 用户 + /system/user/updatePwd: + post: + description: 修改密码 + parameters: + - description: pwd + in: body + name: pwd + required: true + schema: + $ref: '#/definitions/entity.SysUserPwd' + responses: + "200": + description: '{"code": -1, "message": "添加失败"}' + schema: + type: string + summary: 修改密码 + tags: + - 用户 swagger: "2.0" diff --git a/resource/template/go/api.template b/resource/template/go/api.template index 6fbdb3f..92b87b8 100644 --- a/resource/template/go/api.template +++ b/resource/template/go/api.template @@ -43,7 +43,7 @@ func (p *{{.ClassName}}Api) Get{{.ClassName}}List(rc *ctx.ReqCtx) { // @Tags {{.FunctionName}} // @Param {{.PkJsonField}} path int true "{{.PkJsonField}}" // @Success 200 {string} string "{"code": 200, "data": [...]}" -// @Router /{{.PackageName}}/{{.BusinessName}}/{{ "{" }}{{.PkJsonField}} {{"}"}}[get] +// @Router /{{.PackageName}}/{{.BusinessName}}/{{"{"}}{{.PkJsonField}}{{"}"}} [get] // @Security func (p *{{.ClassName}}Api) Get{{.ClassName}}(rc *ctx.ReqCtx) { {{.PkJsonField}} := ginx.PathParamInt(rc.GinCtx, "{{.PkJsonField}}") @@ -90,7 +90,7 @@ func (p *{{.ClassName}}Api) Update{{.ClassName}}(rc *ctx.ReqCtx) { // @Param {{.PkJsonField}} path string true "{{.PkJsonField}}" // @Success 200 {string} string "{"code": 200, "message": "删除成功"}" // @Success 200 {string} string "{"code": 400, "message": "删除失败"}" -// @Router /{{.PackageName}}/{{.BusinessName}}/{{ "{" }}{{.PkJsonField}} {{"}"}} [delete] +// @Router /{{.PackageName}}/{{.BusinessName}}/{{"{"}}{{.PkJsonField}}{{"}"}} [delete] func (p *{{.ClassName}}Api) Delete{{.ClassName}}(rc *ctx.ReqCtx) { {{.PkJsonField}} := rc.GinCtx.Param("{{.PkJsonField}}")