From 1ab11c46ba2752f537bd56031d375d037c49f504 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sun, 20 Jun 2021 00:51:55 +0800 Subject: [PATCH] =?UTF-8?q?docs=F0=9F=93=9D:=20=20=E6=9B=B4=E6=96=B0swagge?= =?UTF-8?q?r=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs.go | 977 +++++++++++++++++++++++++++++++--------------- docs/swagger.json | 977 +++++++++++++++++++++++++++++++--------------- docs/swagger.yaml | 675 +++++++++++++++++++++----------- 3 files changed, 1803 insertions(+), 826 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 8547698e6..15863c555 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -154,14 +154,14 @@ var doc = `{ "parameters": [ { "type": "string", - "description": "name", - "name": "name", + "description": "deptName", + "name": "deptName", "in": "query" }, { "type": "string", - "description": "id", - "name": "id", + "description": "deptId", + "name": "deptId", "in": "query" }, { @@ -435,6 +435,37 @@ var doc = `{ } } } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除数据", + "tags": [ + "字典数据" + ], + "summary": "删除字典数据", + "parameters": [ + { + "description": "body", + "name": "dictCode", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SysDictDataById" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/api/v1/dict/data/{dictCode}": { @@ -500,35 +531,6 @@ var doc = `{ } } } - }, - "delete": { - "security": [ - { - "Bearer": [] - } - ], - "description": "删除数据", - "tags": [ - "字典数据" - ], - "summary": "删除字典数据", - "parameters": [ - { - "type": "integer", - "description": "dictCode", - "name": "dictCode", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", - "schema": { - "type": "string" - } - } - } } }, "/api/v1/dict/type": { @@ -617,6 +619,30 @@ var doc = `{ } } } + }, + "delete": { + "description": "删除数据", + "tags": [ + "字典类型" + ], + "summary": "删除字典类型", + "parameters": [ + { + "type": "integer", + "description": "dictId", + "name": "dictId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/api/v1/dict/type-option-select": { @@ -724,27 +750,25 @@ var doc = `{ } } } - }, - "delete": { - "description": "删除数据", - "tags": [ - "字典类型" - ], - "summary": "删除字典类型", - "parameters": [ + } + }, + "/api/v1/getinfo": { + "get": { + "security": [ { - "type": "integer", - "description": "dictId", - "name": "dictId", - "in": "path", - "required": true + "Bearer": [] } ], + "description": "获取JSON", + "tags": [ + "个人中心" + ], + "summary": "获取个人信息", "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -806,9 +830,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -821,7 +845,7 @@ var doc = `{ ], "description": "获取JSON", "consumes": [ - "application/x-www-form-urlencoded" + "application/json" ], "tags": [ "菜单" @@ -829,52 +853,20 @@ var doc = `{ "summary": "创建菜单", "parameters": [ { - "type": "string", - "description": "menuName", - "name": "menuName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "Path", - "name": "Path", - "in": "formData" - }, - { - "type": "string", - "description": "Action", - "name": "Action", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "Permission", - "name": "Permission", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "ParentId", - "name": "ParentId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "IsDel", - "name": "IsDel", - "in": "formData", - "required": true + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SysMenuControl" + } } ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -898,9 +890,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -921,16 +913,16 @@ var doc = `{ "parameters": [ { "type": "string", - "description": "menuName", - "name": "menuName", - "in": "query" + "description": "id", + "name": "id", + "in": "path" } ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -943,7 +935,7 @@ var doc = `{ ], "description": "获取JSON", "consumes": [ - "application/x-www-form-urlencoded" + "application/json" ], "tags": [ "菜单" @@ -969,9 +961,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"修改失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -986,7 +978,7 @@ var doc = `{ ], "description": "获取JSON", "consumes": [ - "application/x-www-form-urlencoded" + "application/json" ], "tags": [ "菜单" @@ -1003,40 +995,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/v1/menuids/{id}": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "description": "获取JSON", - "tags": [ - "菜单" - ], - "summary": "获取角色对应的菜单id数组", - "parameters": [ - { - "type": "integer", - "description": "id", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1056,9 +1017,9 @@ var doc = `{ "summary": "根据登录角色名称获取菜单列表数据(左菜单使用)", "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1144,6 +1105,36 @@ var doc = `{ } } } + }, + "delete": { + "description": "删除数据", + "tags": [ + "岗位" + ], + "summary": "删除岗位", + "parameters": [ + { + "type": "integer", + "description": "id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "type": "string" + } + }, + "500": { + "description": "{\"code\": 500, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/api/v1/post/": { @@ -1211,48 +1202,18 @@ var doc = `{ } } } - }, - "delete": { - "description": "删除数据", + } + }, + "/api/v1/public/uploadFile": { + "post": { + "description": "获取JSON", + "consumes": [ + "multipart/form-data" + ], "tags": [ - "岗位" + "公共接口" ], - "summary": "删除岗位", - "parameters": [ - { - "type": "integer", - "description": "id", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": 200, \"message\": \"删除成功\"}", - "schema": { - "type": "string" - } - }, - "500": { - "description": "{\"code\": 500, \"message\": \"删除失败\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/v1/public/uploadFile": { - "post": { - "description": "获取JSON", - "consumes": [ - "multipart/form-data" - ], - "tags": [ - "公共接口" - ], - "summary": "上传图片", + "summary": "上传图片", "parameters": [ { "type": "string", @@ -1359,9 +1320,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1390,9 +1351,45 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/role-status/{id}": { + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "更新角色数据权限", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RoleDataScopeReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" } } } @@ -1420,9 +1417,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1454,9 +1451,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"修改失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1911,16 +1908,16 @@ var doc = `{ "Bearer": [] } ], - "description": "获取配置管理", + "description": "根据Key获取SysConfig的Service", "tags": [ "配置管理" ], - "summary": "获取配置管理", + "summary": "根据Key获取SysConfig的Service", "parameters": [ { "type": "string", - "description": "id", - "name": "id", + "description": "configKey", + "name": "configKey", "in": "path" } ], @@ -1936,7 +1933,7 @@ var doc = `{ "type": "object", "properties": { "data": { - "$ref": "#/definitions/models.SysConfig" + "$ref": "#/definitions/dto.SysConfigByKeyReq" } } } @@ -1980,6 +1977,122 @@ var doc = `{ } } }, + "/api/v1/sys-login-log": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "登录日志列表", + "parameters": [ + { + "type": "string", + "description": "用户名", + "name": "username", + "in": "query" + }, + { + "type": "string", + "description": "ip地址", + "name": "ipaddr", + "in": "query" + }, + { + "type": "string", + "description": "归属地", + "name": "loginLocation", + "in": "query" + }, + { + "type": "string", + "description": "状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "开始时间", + "name": "beginTime", + "in": "query" + }, + { + "type": "string", + "description": "结束时间", + "name": "endTime", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "description": "登录日志删除", + "tags": [ + "登录日志" + ], + "summary": "登录日志删除", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SysLoginLogById" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/sys-login-log/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "登录日志通过id获取", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/api/v1/sys-opera-log": { "get": { "security": [ @@ -2044,9 +2157,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2070,9 +2183,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2095,25 +2208,99 @@ var doc = `{ "type": "string", "description": "id", "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/sys-user": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "用户" + ], + "summary": "列表用户信息数据", + "parameters": [ + { + "type": "string", + "description": "username", + "name": "username", "in": "query" - }, + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/api/v1/sys-user/{userId}": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "修改用户数据", + "parameters": [ { - "description": "ids", - "name": "ids", + "description": "body", + "name": "data", "in": "body", + "required": true, "schema": { - "type": "array", - "items": { - "type": "integer" - } + "$ref": "#/definitions/dto.SysUserControl" } } ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "用户" + ], + "summary": "删除用户数据", + "parameters": [ + { + "type": "integer", + "description": "userId", + "name": "userId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" } } } @@ -2279,34 +2466,6 @@ var doc = `{ } }, "/api/v1/sysUser": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "description": "获取JSON", - "tags": [ - "用户" - ], - "summary": "列表用户信息数据", - "parameters": [ - { - "type": "string", - "description": "username", - "name": "username", - "in": "query" - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", - "schema": { - "type": "string" - } - } - } - }, "post": { "description": "获取JSON", "consumes": [ @@ -2329,9 +2488,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2368,61 +2527,6 @@ var doc = `{ } } }, - "/api/v1/sysuser/{userId}": { - "put": { - "description": "获取JSON", - "consumes": [ - "application/json" - ], - "tags": [ - "用户" - ], - "summary": "修改用户数据", - "parameters": [ - { - "description": "body", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SysUserControl" - } - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"修改失败\"}", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "删除数据", - "tags": [ - "用户" - ], - "summary": "删除用户数据", - "parameters": [ - { - "type": "integer", - "description": "userId", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", - "schema": { - "type": "string" - } - } - } - } - }, "/api/v1/user/avatar": { "post": { "description": "获取JSON", @@ -2430,7 +2534,7 @@ var doc = `{ "multipart/form-data" ], "tags": [ - "用户" + "个人中心" ], "summary": "修改头像", "parameters": [ @@ -2444,9 +2548,9 @@ var doc = `{ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2510,6 +2614,68 @@ var doc = `{ } } }, + "/api/v1/user/pwd/reset": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "重置用户密码", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ResetSysUserPwdReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/user/status": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "修改用户状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.UpdateSysUserStatusReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/logout": { "post": { "security": [ @@ -2560,6 +2726,49 @@ var doc = `{ } } }, + "dto.ResetSysUserPwdReq": { + "type": "object", + "required": [ + "password", + "userId" + ], + "properties": { + "createBy": { + "type": "integer" + }, + "password": { + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "userId": { + "description": "用户ID", + "type": "integer" + } + } + }, + "dto.RoleDataScopeReq": { + "type": "object", + "required": [ + "dataScope", + "roleId" + ], + "properties": { + "dataScope": { + "type": "string" + }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "roleId": { + "type": "integer" + } + } + }, "dto.SysApiControl": { "type": "object", "properties": { @@ -2685,7 +2894,27 @@ var doc = `{ }, "status": { "description": "状态", - "type": "string" + "type": "integer" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.SysDictDataById": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } }, "updateBy": { "type": "integer" @@ -2729,7 +2958,7 @@ var doc = `{ "type": "string" }, "status": { - "type": "string" + "type": "integer" }, "updateBy": { "type": "integer" @@ -2755,7 +2984,27 @@ var doc = `{ "type": "string" }, "status": { - "type": "string" + "type": "integer" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.SysLoginLogById": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } }, "updateBy": { "type": "integer" @@ -2890,27 +3139,21 @@ var doc = `{ "type": "integer" }, "postCode": { - "description": "编码", "type": "string" }, "postId": { - "description": "id", "type": "integer" }, "postName": { - "description": "名称", "type": "string" }, "remark": { - "description": "备注", "type": "string" }, "sort": { - "description": "排序", "type": "integer" }, "status": { - "description": "状态", "type": "integer" }, "updateBy": { @@ -2944,6 +3187,12 @@ var doc = `{ "dataScope": { "type": "string" }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, "flag": { "description": "标记", "type": "string" @@ -2978,6 +3227,12 @@ var doc = `{ "description": "状态", "type": "string" }, + "sysDept": { + "type": "array", + "items": { + "$ref": "#/definitions/models.SysDept" + } + }, "sysMenu": { "type": "array", "items": { @@ -2991,6 +3246,14 @@ var doc = `{ }, "dto.SysUserControl": { "type": "object", + "required": [ + "deptId", + "email", + "nickName", + "phone", + "status", + "username" + ], "properties": { "avatar": { "type": "string" @@ -3026,7 +3289,8 @@ var doc = `{ "type": "string" }, "status": { - "type": "string" + "type": "string", + "default": "1" }, "updateBy": { "type": "integer" @@ -3040,6 +3304,47 @@ var doc = `{ } } }, + "dto.UpdateStatusReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "roleId": { + "description": "角色编码", + "type": "integer" + }, + "status": { + "description": "状态", + "type": "string" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.UpdateSysUserStatusReq": { + "type": "object", + "required": [ + "status", + "userId" + ], + "properties": { + "createBy": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "userId": { + "description": "用户ID", + "type": "integer" + } + } + }, "handler.Login": { "type": "object", "required": [ @@ -3136,6 +3441,70 @@ var doc = `{ } } }, + "models.SysDept": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/definitions/models.SysDept" + } + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "dataScope": { + "type": "string" + }, + "deptId": { + "description": "部门编码", + "type": "integer" + }, + "deptName": { + "description": "部门名称", + "type": "string" + }, + "deptPath": { + "type": "string" + }, + "email": { + "description": "邮箱", + "type": "string" + }, + "leader": { + "description": "负责人", + "type": "string" + }, + "params": { + "type": "string" + }, + "parentId": { + "description": "上级部门", + "type": "integer" + }, + "phone": { + "description": "手机", + "type": "string" + }, + "sort": { + "description": "排序", + "type": "integer" + }, + "status": { + "description": "状态", + "type": "integer" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, "models.SysMenu": { "type": "object", "properties": { @@ -3293,7 +3662,7 @@ var doc = `{ "type": "string" }, "createBy": { - "type": "string" + "type": "integer" }, "createdAt": { "type": "string" @@ -3395,7 +3764,7 @@ var doc = `{ "type": "integer" }, "updateBy": { - "type": "string" + "type": "integer" }, "updatedAt": { "type": "string" diff --git a/docs/swagger.json b/docs/swagger.json index dcbaeae78..6cd237665 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -137,14 +137,14 @@ "parameters": [ { "type": "string", - "description": "name", - "name": "name", + "description": "deptName", + "name": "deptName", "in": "query" }, { "type": "string", - "description": "id", - "name": "id", + "description": "deptId", + "name": "deptId", "in": "query" }, { @@ -418,6 +418,37 @@ } } } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除数据", + "tags": [ + "字典数据" + ], + "summary": "删除字典数据", + "parameters": [ + { + "description": "body", + "name": "dictCode", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SysDictDataById" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/api/v1/dict/data/{dictCode}": { @@ -483,35 +514,6 @@ } } } - }, - "delete": { - "security": [ - { - "Bearer": [] - } - ], - "description": "删除数据", - "tags": [ - "字典数据" - ], - "summary": "删除字典数据", - "parameters": [ - { - "type": "integer", - "description": "dictCode", - "name": "dictCode", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", - "schema": { - "type": "string" - } - } - } } }, "/api/v1/dict/type": { @@ -600,6 +602,30 @@ } } } + }, + "delete": { + "description": "删除数据", + "tags": [ + "字典类型" + ], + "summary": "删除字典类型", + "parameters": [ + { + "type": "integer", + "description": "dictId", + "name": "dictId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/api/v1/dict/type-option-select": { @@ -707,27 +733,25 @@ } } } - }, - "delete": { - "description": "删除数据", - "tags": [ - "字典类型" - ], - "summary": "删除字典类型", - "parameters": [ + } + }, + "/api/v1/getinfo": { + "get": { + "security": [ { - "type": "integer", - "description": "dictId", - "name": "dictId", - "in": "path", - "required": true + "Bearer": [] } ], + "description": "获取JSON", + "tags": [ + "个人中心" + ], + "summary": "获取个人信息", "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -789,9 +813,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -804,7 +828,7 @@ ], "description": "获取JSON", "consumes": [ - "application/x-www-form-urlencoded" + "application/json" ], "tags": [ "菜单" @@ -812,52 +836,20 @@ "summary": "创建菜单", "parameters": [ { - "type": "string", - "description": "menuName", - "name": "menuName", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "Path", - "name": "Path", - "in": "formData" - }, - { - "type": "string", - "description": "Action", - "name": "Action", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "Permission", - "name": "Permission", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "ParentId", - "name": "ParentId", - "in": "formData", - "required": true - }, - { - "type": "string", - "description": "IsDel", - "name": "IsDel", - "in": "formData", - "required": true + "description": "data", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SysMenuControl" + } } ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -881,9 +873,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -904,16 +896,16 @@ "parameters": [ { "type": "string", - "description": "menuName", - "name": "menuName", - "in": "query" + "description": "id", + "name": "id", + "in": "path" } ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -926,7 +918,7 @@ ], "description": "获取JSON", "consumes": [ - "application/x-www-form-urlencoded" + "application/json" ], "tags": [ "菜单" @@ -952,9 +944,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"修改失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -969,7 +961,7 @@ ], "description": "获取JSON", "consumes": [ - "application/x-www-form-urlencoded" + "application/json" ], "tags": [ "菜单" @@ -986,40 +978,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/v1/menuids/{id}": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "description": "获取JSON", - "tags": [ - "菜单" - ], - "summary": "获取角色对应的菜单id数组", - "parameters": [ - { - "type": "integer", - "description": "id", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1039,9 +1000,9 @@ "summary": "根据登录角色名称获取菜单列表数据(左菜单使用)", "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1127,6 +1088,36 @@ } } } + }, + "delete": { + "description": "删除数据", + "tags": [ + "岗位" + ], + "summary": "删除岗位", + "parameters": [ + { + "type": "integer", + "description": "id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "type": "string" + } + }, + "500": { + "description": "{\"code\": 500, \"message\": \"删除失败\"}", + "schema": { + "type": "string" + } + } + } } }, "/api/v1/post/": { @@ -1194,48 +1185,18 @@ } } } - }, - "delete": { - "description": "删除数据", + } + }, + "/api/v1/public/uploadFile": { + "post": { + "description": "获取JSON", + "consumes": [ + "multipart/form-data" + ], "tags": [ - "岗位" + "公共接口" ], - "summary": "删除岗位", - "parameters": [ - { - "type": "integer", - "description": "id", - "name": "id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": 200, \"message\": \"删除成功\"}", - "schema": { - "type": "string" - } - }, - "500": { - "description": "{\"code\": 500, \"message\": \"删除失败\"}", - "schema": { - "type": "string" - } - } - } - } - }, - "/api/v1/public/uploadFile": { - "post": { - "description": "获取JSON", - "consumes": [ - "multipart/form-data" - ], - "tags": [ - "公共接口" - ], - "summary": "上传图片", + "summary": "上传图片", "parameters": [ { "type": "string", @@ -1342,9 +1303,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1373,9 +1334,45 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/role-status/{id}": { + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "角色/Role" + ], + "summary": "更新角色数据权限", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.RoleDataScopeReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" } } } @@ -1403,9 +1400,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1437,9 +1434,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"修改失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -1894,16 +1891,16 @@ "Bearer": [] } ], - "description": "获取配置管理", + "description": "根据Key获取SysConfig的Service", "tags": [ "配置管理" ], - "summary": "获取配置管理", + "summary": "根据Key获取SysConfig的Service", "parameters": [ { "type": "string", - "description": "id", - "name": "id", + "description": "configKey", + "name": "configKey", "in": "path" } ], @@ -1919,7 +1916,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/models.SysConfig" + "$ref": "#/definitions/dto.SysConfigByKeyReq" } } } @@ -1963,6 +1960,122 @@ } } }, + "/api/v1/sys-login-log": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "登录日志列表", + "parameters": [ + { + "type": "string", + "description": "用户名", + "name": "username", + "in": "query" + }, + { + "type": "string", + "description": "ip地址", + "name": "ipaddr", + "in": "query" + }, + { + "type": "string", + "description": "归属地", + "name": "loginLocation", + "in": "query" + }, + { + "type": "string", + "description": "状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "开始时间", + "name": "beginTime", + "in": "query" + }, + { + "type": "string", + "description": "结束时间", + "name": "endTime", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "description": "登录日志删除", + "tags": [ + "登录日志" + ], + "summary": "登录日志删除", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SysLoginLogById" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/sys-login-log/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "登录日志" + ], + "summary": "登录日志通过id获取", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/api/v1/sys-opera-log": { "get": { "security": [ @@ -2027,9 +2140,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2053,9 +2166,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2078,25 +2191,99 @@ "type": "string", "description": "id", "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/sys-user": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取JSON", + "tags": [ + "用户" + ], + "summary": "列表用户信息数据", + "parameters": [ + { + "type": "string", + "description": "username", + "name": "username", "in": "query" - }, + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "type": "string" + } + } + } + } + }, + "/api/v1/sys-user/{userId}": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "修改用户数据", + "parameters": [ { - "description": "ids", - "name": "ids", + "description": "body", + "name": "data", "in": "body", + "required": true, "schema": { - "type": "array", - "items": { - "type": "integer" - } + "$ref": "#/definitions/dto.SysUserControl" } } ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "description": "删除数据", + "tags": [ + "用户" + ], + "summary": "删除用户数据", + "parameters": [ + { + "type": "integer", + "description": "userId", + "name": "userId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" } } } @@ -2262,34 +2449,6 @@ } }, "/api/v1/sysUser": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "description": "获取JSON", - "tags": [ - "用户" - ], - "summary": "列表用户信息数据", - "parameters": [ - { - "type": "string", - "description": "username", - "name": "username", - "in": "query" - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"抱歉未找到相关信息\"}", - "schema": { - "type": "string" - } - } - } - }, "post": { "description": "获取JSON", "consumes": [ @@ -2312,9 +2471,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2351,61 +2510,6 @@ } } }, - "/api/v1/sysuser/{userId}": { - "put": { - "description": "获取JSON", - "consumes": [ - "application/json" - ], - "tags": [ - "用户" - ], - "summary": "修改用户数据", - "parameters": [ - { - "description": "body", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/dto.SysUserControl" - } - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"修改失败\"}", - "schema": { - "type": "string" - } - } - } - }, - "delete": { - "description": "删除数据", - "tags": [ - "用户" - ], - "summary": "删除用户数据", - "parameters": [ - { - "type": "integer", - "description": "userId", - "name": "userId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "{\"code\": -1, \"message\": \"删除失败\"}", - "schema": { - "type": "string" - } - } - } - } - }, "/api/v1/user/avatar": { "post": { "description": "获取JSON", @@ -2413,7 +2517,7 @@ "multipart/form-data" ], "tags": [ - "用户" + "个人中心" ], "summary": "修改头像", "parameters": [ @@ -2427,9 +2531,9 @@ ], "responses": { "200": { - "description": "{\"code\": -1, \"message\": \"添加失败\"}", + "description": "{\"code\": 200, \"data\": [...]}", "schema": { - "type": "string" + "$ref": "#/definitions/response.Response" } } } @@ -2493,6 +2597,68 @@ } } }, + "/api/v1/user/pwd/reset": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "重置用户密码", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ResetSysUserPwdReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/user/status": { + "put": { + "description": "获取JSON", + "consumes": [ + "application/json" + ], + "tags": [ + "用户" + ], + "summary": "修改用户状态", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.UpdateSysUserStatusReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/logout": { "post": { "security": [ @@ -2543,6 +2709,49 @@ } } }, + "dto.ResetSysUserPwdReq": { + "type": "object", + "required": [ + "password", + "userId" + ], + "properties": { + "createBy": { + "type": "integer" + }, + "password": { + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "userId": { + "description": "用户ID", + "type": "integer" + } + } + }, + "dto.RoleDataScopeReq": { + "type": "object", + "required": [ + "dataScope", + "roleId" + ], + "properties": { + "dataScope": { + "type": "string" + }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, + "roleId": { + "type": "integer" + } + } + }, "dto.SysApiControl": { "type": "object", "properties": { @@ -2668,7 +2877,27 @@ }, "status": { "description": "状态", - "type": "string" + "type": "integer" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.SysDictDataById": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } }, "updateBy": { "type": "integer" @@ -2712,7 +2941,7 @@ "type": "string" }, "status": { - "type": "string" + "type": "integer" }, "updateBy": { "type": "integer" @@ -2738,7 +2967,27 @@ "type": "string" }, "status": { - "type": "string" + "type": "integer" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.SysLoginLogById": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "id": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } }, "updateBy": { "type": "integer" @@ -2873,27 +3122,21 @@ "type": "integer" }, "postCode": { - "description": "编码", "type": "string" }, "postId": { - "description": "id", "type": "integer" }, "postName": { - "description": "名称", "type": "string" }, "remark": { - "description": "备注", "type": "string" }, "sort": { - "description": "排序", "type": "integer" }, "status": { - "description": "状态", "type": "integer" }, "updateBy": { @@ -2927,6 +3170,12 @@ "dataScope": { "type": "string" }, + "deptIds": { + "type": "array", + "items": { + "type": "integer" + } + }, "flag": { "description": "标记", "type": "string" @@ -2961,6 +3210,12 @@ "description": "状态", "type": "string" }, + "sysDept": { + "type": "array", + "items": { + "$ref": "#/definitions/models.SysDept" + } + }, "sysMenu": { "type": "array", "items": { @@ -2974,6 +3229,14 @@ }, "dto.SysUserControl": { "type": "object", + "required": [ + "deptId", + "email", + "nickName", + "phone", + "status", + "username" + ], "properties": { "avatar": { "type": "string" @@ -3009,7 +3272,8 @@ "type": "string" }, "status": { - "type": "string" + "type": "string", + "default": "1" }, "updateBy": { "type": "integer" @@ -3023,6 +3287,47 @@ } } }, + "dto.UpdateStatusReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "roleId": { + "description": "角色编码", + "type": "integer" + }, + "status": { + "description": "状态", + "type": "string" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.UpdateSysUserStatusReq": { + "type": "object", + "required": [ + "status", + "userId" + ], + "properties": { + "createBy": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "userId": { + "description": "用户ID", + "type": "integer" + } + } + }, "handler.Login": { "type": "object", "required": [ @@ -3119,6 +3424,70 @@ } } }, + "models.SysDept": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/definitions/models.SysDept" + } + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "dataScope": { + "type": "string" + }, + "deptId": { + "description": "部门编码", + "type": "integer" + }, + "deptName": { + "description": "部门名称", + "type": "string" + }, + "deptPath": { + "type": "string" + }, + "email": { + "description": "邮箱", + "type": "string" + }, + "leader": { + "description": "负责人", + "type": "string" + }, + "params": { + "type": "string" + }, + "parentId": { + "description": "上级部门", + "type": "integer" + }, + "phone": { + "description": "手机", + "type": "string" + }, + "sort": { + "description": "排序", + "type": "integer" + }, + "status": { + "description": "状态", + "type": "integer" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, "models.SysMenu": { "type": "object", "properties": { @@ -3276,7 +3645,7 @@ "type": "string" }, "createBy": { - "type": "string" + "type": "integer" }, "createdAt": { "type": "string" @@ -3378,7 +3747,7 @@ "type": "integer" }, "updateBy": { - "type": "string" + "type": "integer" }, "updatedAt": { "type": "string" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index f31c3895a..bb89db383 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -16,6 +16,35 @@ definitions: - newPassword - oldPassword type: object + dto.ResetSysUserPwdReq: + properties: + createBy: + type: integer + password: + type: string + updateBy: + type: integer + userId: + description: 用户ID + type: integer + required: + - password + - userId + type: object + dto.RoleDataScopeReq: + properties: + dataScope: + type: string + deptIds: + items: + type: integer + type: array + roleId: + type: integer + required: + - dataScope + - roleId + type: object dto.SysApiControl: properties: action: @@ -102,7 +131,20 @@ definitions: type: integer status: description: 状态 - type: string + type: integer + updateBy: + type: integer + type: object + dto.SysDictDataById: + properties: + createBy: + type: integer + id: + type: integer + ids: + items: + type: integer + type: array updateBy: type: integer type: object @@ -131,7 +173,7 @@ definitions: remark: type: string status: - type: string + type: integer updateBy: type: integer type: object @@ -148,7 +190,20 @@ definitions: remark: type: string status: - type: string + type: integer + updateBy: + type: integer + type: object + dto.SysLoginLogById: + properties: + createBy: + type: integer + id: + type: integer + ids: + items: + type: integer + type: array updateBy: type: integer type: object @@ -242,22 +297,16 @@ definitions: createBy: type: integer postCode: - description: 编码 type: string postId: - description: id type: integer postName: - description: 名称 type: string remark: - description: 备注 type: string sort: - description: 排序 type: integer status: - description: 状态 type: integer updateBy: type: integer @@ -279,6 +328,10 @@ definitions: type: integer dataScope: type: string + deptIds: + items: + type: integer + type: array flag: description: 标记 type: string @@ -304,6 +357,10 @@ definitions: status: description: 状态 type: string + sysDept: + items: + $ref: '#/definitions/models.SysDept' + type: array sysMenu: items: $ref: '#/definitions/models.SysMenu' @@ -336,6 +393,7 @@ definitions: sex: type: string status: + default: "1" type: string updateBy: type: integer @@ -344,6 +402,41 @@ definitions: type: integer username: type: string + required: + - deptId + - email + - nickName + - phone + - status + - username + type: object + dto.UpdateStatusReq: + properties: + createBy: + type: integer + roleId: + description: 角色编码 + type: integer + status: + description: 状态 + type: string + updateBy: + type: integer + type: object + dto.UpdateSysUserStatusReq: + properties: + createBy: + type: integer + status: + type: string + updateBy: + type: integer + userId: + description: 用户ID + type: integer + required: + - status + - userId type: object handler.Login: properties: @@ -409,6 +502,51 @@ definitions: updatedAt: type: string type: object + models.SysDept: + properties: + children: + items: + $ref: '#/definitions/models.SysDept' + type: array + createBy: + type: integer + createdAt: + type: string + dataScope: + type: string + deptId: + description: 部门编码 + type: integer + deptName: + description: 部门名称 + type: string + deptPath: + type: string + email: + description: 邮箱 + type: string + leader: + description: 负责人 + type: string + params: + type: string + parentId: + description: 上级部门 + type: integer + phone: + description: 手机 + type: string + sort: + description: 排序 + type: integer + status: + description: 状态 + type: integer + updateBy: + type: integer + updatedAt: + type: string + type: object models.SysMenu: properties: action: @@ -513,7 +651,7 @@ definitions: columnType: type: string createBy: - type: string + type: integer createdAt: type: string deletedAt: @@ -581,7 +719,7 @@ definitions: tableId: type: integer updateBy: - type: string + type: integer updatedAt: type: string usableColumn: @@ -771,13 +909,13 @@ paths: get: description: 分页列表 parameters: - - description: name + - description: deptName in: query - name: name + name: deptName type: string - - description: id + - description: deptId in: query - name: id + name: deptId type: string - description: position in: query @@ -882,6 +1020,25 @@ paths: tags: - 字典数据 /api/v1/dict/data: + delete: + description: 删除数据 + parameters: + - description: body + in: body + name: dictCode + required: true + schema: + $ref: '#/definitions/dto.SysDictDataById' + responses: + "200": + description: '{"code": -1, "message": "删除失败"}' + schema: + type: string + security: + - Bearer: [] + summary: 删除字典数据 + tags: + - 字典数据 get: description: 获取JSON parameters: @@ -937,24 +1094,6 @@ paths: tags: - 字典数据 /api/v1/dict/data/{dictCode}: - delete: - description: 删除数据 - parameters: - - description: dictCode - in: path - name: dictCode - required: true - type: integer - responses: - "200": - description: '{"code": -1, "message": "删除失败"}' - schema: - type: string - security: - - Bearer: [] - summary: 删除字典数据 - tags: - - 字典数据 get: description: 获取JSON parameters: @@ -995,6 +1134,22 @@ paths: tags: - 字典数据 /api/v1/dict/type: + delete: + description: 删除数据 + parameters: + - description: dictId + in: path + name: dictId + required: true + type: integer + responses: + "200": + description: '{"code": -1, "message": "删除失败"}' + schema: + type: string + summary: 删除字典类型 + tags: + - 字典类型 get: description: 获取JSON parameters: @@ -1076,22 +1231,6 @@ paths: tags: - 字典类型 /api/v1/dict/type/{dictId}: - delete: - description: 删除数据 - parameters: - - description: dictId - in: path - name: dictId - required: true - type: integer - responses: - "200": - description: '{"code": -1, "message": "删除失败"}' - schema: - type: string - summary: 删除字典类型 - tags: - - 字典类型 get: description: 获取JSON parameters: @@ -1131,6 +1270,19 @@ paths: summary: 修改字典类型 tags: - 字典类型 + /api/v1/getinfo: + get: + description: 获取JSON + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: 获取个人信息 + tags: + - 个人中心 /api/v1/login: post: consumes: @@ -1169,9 +1321,9 @@ paths: $ref: '#/definitions/dto.SysMenuById' responses: "200": - description: '{"code": -1, "message": "删除失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' summary: 删除菜单 tags: - 菜单 @@ -1188,9 +1340,9 @@ paths: type: string responses: "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: Menu列表数据 @@ -1198,43 +1350,20 @@ paths: - 菜单 post: consumes: - - application/x-www-form-urlencoded + - application/json description: 获取JSON parameters: - - description: menuName - in: formData - name: menuName - required: true - type: string - - description: Path - in: formData - name: Path - type: string - - description: Action - in: formData - name: Action - required: true - type: string - - description: Permission - in: formData - name: Permission - required: true - type: string - - description: ParentId - in: formData - name: ParentId - required: true - type: string - - description: IsDel - in: formData - name: IsDel + - description: data + in: body + name: data required: true - type: string + schema: + $ref: '#/definitions/dto.SysMenuControl' responses: "200": - description: '{"code": -1, "message": "添加失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 创建菜单 @@ -1244,15 +1373,15 @@ paths: get: description: 获取JSON parameters: - - description: menuName - in: query - name: menuName + - description: id + in: path + name: id type: string responses: "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: Menu详情数据 @@ -1260,7 +1389,7 @@ paths: - 菜单 put: consumes: - - application/x-www-form-urlencoded + - application/json description: 获取JSON parameters: - description: id @@ -1276,9 +1405,9 @@ paths: $ref: '#/definitions/dto.SysMenuControl' responses: "200": - description: '{"code": -1, "message": "修改失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 修改菜单 @@ -1287,7 +1416,7 @@ paths: /api/v1/menuTreeselect/{roleId}: get: consumes: - - application/x-www-form-urlencoded + - application/json description: 获取JSON parameters: - description: roleId @@ -1297,17 +1426,30 @@ paths: type: integer responses: "200": - description: '{"code": -1, "message": "添加失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 角色修改使用的菜单列表 tags: - 菜单 - /api/v1/menuids/{id}: + /api/v1/menurole: get: description: 获取JSON + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: 根据登录角色名称获取菜单列表数据(左菜单使用) + tags: + - 菜单 + /api/v1/post: + delete: + description: 删除数据 parameters: - description: id in: path @@ -1316,28 +1458,16 @@ paths: type: integer responses: "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + description: '{"code": 200, "message": "删除成功"}' schema: type: string - security: - - Bearer: [] - summary: 获取角色对应的菜单id数组 - tags: - - 菜单 - /api/v1/menurole: - get: - description: 获取JSON - responses: - "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + "500": + description: '{"code": 500, "message": "删除失败"}' schema: type: string - security: - - Bearer: [] - summary: 根据登录角色名称获取菜单列表数据(左菜单使用) + summary: 删除岗位 tags: - - 菜单 - /api/v1/post: + - 岗位 get: description: 获取JSON parameters: @@ -1411,26 +1541,6 @@ paths: tags: - 岗位 /api/v1/post/{postId}: - delete: - description: 删除数据 - parameters: - - description: id - in: path - name: id - required: true - type: integer - responses: - "200": - description: '{"code": 200, "message": "删除成功"}' - schema: - type: string - "500": - description: '{"code": 500, "message": "删除失败"}' - schema: - type: string - summary: 删除岗位 - tags: - - 岗位 get: description: 获取JSON parameters: @@ -1485,9 +1595,9 @@ paths: $ref: '#/definitions/dto.SysRoleById' responses: "200": - description: '{"code": -1, "message": "删除失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 删除用户角色 @@ -1539,14 +1649,36 @@ paths: $ref: '#/definitions/dto.SysRoleControl' responses: "200": - description: '{"code": -1, "message": "添加失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 创建角色 tags: - 角色/Role + /api/v1/role-status/{id}: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/dto.RoleDataScopeReq' + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: 更新角色数据权限 + tags: + - 角色/Role /api/v1/role/{id}: get: description: 获取JSON @@ -1557,9 +1689,9 @@ paths: type: string responses: "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 获取Role数据 @@ -1578,9 +1710,9 @@ paths: $ref: '#/definitions/dto.SysRoleControl' responses: "200": - description: '{"code": -1, "message": "修改失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 修改用户角色 @@ -1848,11 +1980,11 @@ paths: - 配置管理 /api/v1/sys-config/{id}: get: - description: 获取配置管理 + description: 根据Key获取SysConfig的Service parameters: - - description: id + - description: configKey in: path - name: id + name: configKey type: string responses: "200": @@ -1862,11 +1994,11 @@ paths: - $ref: '#/definitions/response.Response' - properties: data: - $ref: '#/definitions/models.SysConfig' + $ref: '#/definitions/dto.SysConfigByKeyReq' type: object security: - Bearer: [] - summary: 获取配置管理 + summary: 根据Key获取SysConfig的Service tags: - 配置管理 put: @@ -1890,6 +2022,79 @@ paths: summary: 修改配置管理 tags: - 配置管理 + /api/v1/sys-login-log: + delete: + description: 登录日志删除 + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/dto.SysLoginLogById' + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + summary: 登录日志删除 + tags: + - 登录日志 + get: + description: 获取JSON + parameters: + - description: 用户名 + in: query + name: username + type: string + - description: ip地址 + in: query + name: ipaddr + type: string + - description: 归属地 + in: query + name: loginLocation + type: string + - description: 状态 + in: query + name: status + type: string + - description: 开始时间 + in: query + name: beginTime + type: string + - description: 结束时间 + in: query + name: endTime + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: 登录日志列表 + tags: + - 登录日志 + /api/v1/sys-login-log/{id}: + get: + description: 获取JSON + parameters: + - description: id + in: path + name: id + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + security: + - Bearer: [] + summary: 登录日志通过id获取 + tags: + - 登录日志 /api/v1/sys-opera-log: delete: description: 删除数据 @@ -1902,9 +2107,9 @@ paths: $ref: '#/definitions/dto.SysOperaLogById' responses: "200": - description: '{"code": -1, "message": "删除失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' summary: 删除操作日志 tags: - 操作日志 @@ -1945,9 +2150,9 @@ paths: type: string responses: "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 操作日志列表 @@ -1958,26 +2163,73 @@ paths: description: 获取JSON parameters: - description: id - in: query + in: path name: id type: string - - description: ids - in: body - name: ids - schema: - items: - type: integer - type: array responses: "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' security: - Bearer: [] summary: 操作日志通过id获取 tags: - 操作日志 + /api/v1/sys-user: + get: + description: 获取JSON + parameters: + - description: username + in: query + name: username + type: string + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + type: string + security: + - Bearer: [] + summary: 列表用户信息数据 + tags: + - 用户 + /api/v1/sys-user/{userId}: + delete: + description: 删除数据 + parameters: + - description: userId + in: path + name: userId + required: true + type: integer + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + summary: 删除用户数据 + tags: + - 用户 + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/dto.SysUserControl' + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + summary: 修改用户数据 + tags: + - 用户 /api/v1/sys/tables/info: post: consumes: @@ -2079,23 +2331,6 @@ paths: tags: - 工具 - 生成表 /api/v1/sysUser: - get: - description: 获取JSON - parameters: - - description: username - in: query - name: username - type: string - responses: - "200": - description: '{"code": -1, "message": "抱歉未找到相关信息"}' - schema: - type: string - security: - - Bearer: [] - summary: 列表用户信息数据 - tags: - - 用户 post: consumes: - application/json @@ -2109,9 +2344,9 @@ paths: $ref: '#/definitions/dto.SysUserControl' responses: "200": - description: '{"code": -1, "message": "添加失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' summary: 创建用户 tags: - 用户 @@ -2134,42 +2369,6 @@ paths: summary: 获取用户 tags: - 用户 - /api/v1/sysuser/{userId}: - delete: - description: 删除数据 - parameters: - - description: userId - in: path - name: userId - required: true - type: integer - responses: - "200": - description: '{"code": -1, "message": "删除失败"}' - schema: - type: string - summary: 删除用户数据 - tags: - - 用户 - put: - consumes: - - application/json - description: 获取JSON - parameters: - - description: body - in: body - name: data - required: true - schema: - $ref: '#/definitions/dto.SysUserControl' - responses: - "200": - description: '{"code": -1, "message": "修改失败"}' - schema: - type: string - summary: 修改用户数据 - tags: - - 用户 /api/v1/user/avatar: post: consumes: @@ -2183,12 +2382,12 @@ paths: type: file responses: "200": - description: '{"code": -1, "message": "添加失败"}' + description: '{"code": 200, "data": [...]}' schema: - type: string + $ref: '#/definitions/response.Response' summary: 修改头像 tags: - - 用户 + - 个人中心 /api/v1/user/profile: get: description: 获取JSON @@ -2224,6 +2423,46 @@ paths: summary: 重置密码 tags: - 用户 + /api/v1/user/pwd/reset: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/dto.ResetSysUserPwdReq' + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + summary: 重置用户密码 + tags: + - 用户 + /api/v1/user/status: + put: + consumes: + - application/json + description: 获取JSON + parameters: + - description: body + in: body + name: data + required: true + schema: + $ref: '#/definitions/dto.UpdateSysUserStatusReq' + responses: + "200": + description: '{"code": 200, "data": [...]}' + schema: + $ref: '#/definitions/response.Response' + summary: 修改用户状态 + tags: + - 用户 /logout: post: consumes: