From 5b2e870ce67950d0eec36e0d224f6fc4e5296ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Sat, 5 Mar 2022 10:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/magic-api/api/后台/安全/登录.ms | 4 +- .../api/后台/安全/获取当前用户权限code.ms | 21 +- data/magic-api/api/后台/组织机构/列表.ms | 234 +----------------- .../api/后台/菜单管理/当前用户菜单.ms | 111 ++++++++- .../api/后台/菜单管理/获取菜单tree.ms | 4 +- data/magic-api/api/后台/配置/获取所有配置.ms | 6 +- 6 files changed, 132 insertions(+), 248 deletions(-) diff --git a/data/magic-api/api/后台/安全/登录.ms b/data/magic-api/api/后台/安全/登录.ms index 06562a9..7f855ba 100644 --- a/data/magic-api/api/后台/安全/登录.ms +++ b/data/magic-api/api/后台/安全/登录.ms @@ -5,7 +5,7 @@ "groupId" : "1952f25c81084e24b55b11385767dc38", "name" : "登录", "createTime" : null, - "updateTime" : 1643710774934, + "updateTime" : 1646400972875, "lock" : "0", "method" : "POST", "path" : "/login", @@ -17,7 +17,7 @@ "responseBody" : "{\n \"code\": 0,\n \"message\": \"用户名或密码错误\",\n \"data\": null,\n \"timestamp\": 1643710761990,\n \"executeTime\": 6\n}", "description" : null, "requestBodyDefinition" : { - "name" : "", + "name" : "root", "value" : "", "description" : "", "required" : false, diff --git a/data/magic-api/api/后台/安全/获取当前用户权限code.ms b/data/magic-api/api/后台/安全/获取当前用户权限code.ms index 3e40302..05e7739 100644 --- a/data/magic-api/api/后台/安全/获取当前用户权限code.ms +++ b/data/magic-api/api/后台/安全/获取当前用户权限code.ms @@ -5,7 +5,7 @@ "groupId" : "1952f25c81084e24b55b11385767dc38", "name" : "获取当前用户权限code", "createTime" : null, - "updateTime" : 1644121674755, + "updateTime" : 1645715502500, "lock" : "0", "method" : "POST", "path" : "/permissions", @@ -14,7 +14,7 @@ "requestBody" : "{\n\n}", "headers" : [ ], "paths" : [ ], - "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [\"sys:test:aaa\", \"menu:save\", \"menu:delete\", \"office:office:list\", \"office:office:save\", \"office:office:delete\", \"role:view\", \"role:save\", \"role:delete\", \"user:save\", \"user:delete\", \"dict:view\", \"dict:save\", \"dict:delete\", \"dict:items\", \"dict:items:save\", \"dict:items:delete\"],\n \"timestamp\": 1641199273283,\n \"executeTime\": 1\n}", + "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [\"menu:view\", \"menu:save\", \"menu:delete\", \"office:save\", \"office:delete\", \"role:save\", \"role:delete\", \"role:permission\", \"user:save\", \"user:delete\", \"dict:save\", \"dict:delete\", \"dict:items:save\", \"dict:items:delete\", \"office:view\", \"role:view\", \"user:view\", \"dict:view\", \"dict:items:view\"],\n \"timestamp\": 1645715342825,\n \"executeTime\": 2\n}", "description" : null, "requestBodyDefinition" : null, "responseBodyDefinition" : { @@ -65,7 +65,7 @@ "expression" : "", "children" : [ { "name" : "", - "value" : "sys:test:aaa", + "value" : "menu:view", "description" : "", "required" : false, "dataType" : "String", @@ -78,7 +78,7 @@ } ] }, { "name" : "timestamp", - "value" : "1641199273283", + "value" : "1645715342825", "description" : "", "required" : false, "dataType" : "Long", @@ -90,7 +90,7 @@ "children" : [ ] }, { "name" : "executeTime", - "value" : "1", + "value" : "2", "description" : "", "required" : false, "dataType" : "Object", @@ -115,11 +115,12 @@ return db.cache(`permissions:${userId}`).select(""" sm.permission FROM sys_menu sm - right JOIN sys_role_menu srm ON sm.id = srm.menu_id - right JOIN sys_user_role sur ON sur.role_id = srm.role_id - right JOIN sys_user su ON su.id = sur.user_id - ?{userId != '1', AND su.id = #{userId}} - AND su.is_del = 0 + ?{userId != '1', + right JOIN sys_role_menu srm ON sm.id = srm.menu_id + right JOIN sys_user_role sur ON sur.role_id = srm.role_id + right JOIN sys_user su ON su.id = sur.user_id + AND su.id = #{userId} AND su.is_del = 0 + } WHERE sm.is_del = 0 AND sm.permission != '' diff --git a/data/magic-api/api/后台/组织机构/列表.ms b/data/magic-api/api/后台/组织机构/列表.ms index 623cf71..b6d21fa 100644 --- a/data/magic-api/api/后台/组织机构/列表.ms +++ b/data/magic-api/api/后台/组织机构/列表.ms @@ -5,7 +5,7 @@ "groupId" : "8295fc13678d4144bf7363c465247a50", "name" : "列表", "createTime" : null, - "updateTime" : 1644121676212, + "updateTime" : 1645694064991, "lock" : "0", "method" : "GET", "path" : "/tree", @@ -14,7 +14,7 @@ "requestBody" : "{\n\n}", "headers" : [ ], "paths" : [ ], - "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"list\": [{\n \"id\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"name\": \"马小东公司\",\n \"pid\": \"0\",\n \"type\": \"2\",\n \"sort\": 10,\n \"code\": \"mxd\",\n \"children\": [{\n \"id\": \"81b5493cdb31477f9ceea85b2cd08f15\",\n \"name\": \"马小东子公司\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"type\": null,\n \"sort\": 10,\n \"code\": \"mxdz\",\n \"children\": []\n }, {\n \"id\": \"31b365008f994e93850186126fce87cb\",\n \"name\": \"马小东子公司2\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"type\": null,\n \"sort\": 20,\n \"code\": \"mxdzz\",\n \"children\": []\n }]\n }, {\n \"id\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"name\": \"吕金泽公司\",\n \"pid\": \"0\",\n \"type\": null,\n \"sort\": 20,\n \"code\": \"ljz\",\n \"children\": [{\n \"id\": \"1ae0299fc79b43c6b0ae2e14756ec41a\",\n \"name\": \"吕金泽子公司\",\n \"pid\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"type\": null,\n \"sort\": 10,\n \"code\": \"ljzz\",\n \"children\": []\n }]\n }],\n \"total\": 2\n },\n \"timestamp\": 1642134812650,\n \"executeTime\": 9\n}", + "responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1645694060610,\n \"executeTime\": null\n}", "description" : null, "requestBodyDefinition" : null, "responseBodyDefinition" : { @@ -30,7 +30,7 @@ "expression" : "", "children" : [ { "name" : "code", - "value" : "200", + "value" : "402", "description" : "", "required" : false, "dataType" : "Integer", @@ -42,7 +42,7 @@ "children" : [ ] }, { "name" : "message", - "value" : "success", + "value" : "凭证已过期", "description" : "", "required" : false, "dataType" : "String", @@ -54,7 +54,7 @@ "children" : [ ] }, { "name" : "data", - "value" : "", + "value" : "null", "description" : "", "required" : false, "dataType" : "Object", @@ -63,226 +63,10 @@ "validateType" : "", "error" : "", "expression" : "", - "children" : [ { - "name" : "list", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Array", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "id", - "value" : "4c37a80226134bce8bc91c8fc04a7d2f", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "name", - "value" : "马小东公司", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "pid", - "value" : "0", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "type", - "value" : "2", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "sort", - "value" : "10", - "description" : "", - "required" : false, - "dataType" : "Integer", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "code", - "value" : "mxd", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "children", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Array", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "id", - "value" : "81b5493cdb31477f9ceea85b2cd08f15", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "name", - "value" : "马小东子公司", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "pid", - "value" : "4c37a80226134bce8bc91c8fc04a7d2f", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "type", - "value" : "null", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "sort", - "value" : "10", - "description" : "", - "required" : false, - "dataType" : "Integer", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "code", - "value" : "mxdz", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "children", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Array", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - } ] - } ] - } ] - } ] - }, { - "name" : "total", - "value" : "2", - "description" : "", - "required" : false, - "dataType" : "Integer", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - } ] + "children" : [ ] }, { "name" : "timestamp", - "value" : "1642134812650", + "value" : "1645694060610", "description" : "", "required" : false, "dataType" : "Long", @@ -294,10 +78,10 @@ "children" : [ ] }, { "name" : "executeTime", - "value" : "9", + "value" : "null", "description" : "", "required" : false, - "dataType" : "Integer", + "dataType" : "Object", "type" : null, "defaultValue" : null, "validateType" : "", diff --git a/data/magic-api/api/后台/菜单管理/当前用户菜单.ms b/data/magic-api/api/后台/菜单管理/当前用户菜单.ms index 9fb3b5b..887838d 100644 --- a/data/magic-api/api/后台/菜单管理/当前用户菜单.ms +++ b/data/magic-api/api/后台/菜单管理/当前用户菜单.ms @@ -5,7 +5,7 @@ "groupId" : "67b2ce258e24491194b74992958c74aa", "name" : "当前用户菜单", "createTime" : null, - "updateTime" : 1641482674575, + "updateTime" : 1646400991044, "lock" : "0", "method" : "POST", "path" : "/current/menus", @@ -14,7 +14,7 @@ "requestBody" : "{\n\n}", "headers" : [ ], "paths" : [ ], - "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [{\n \"id\": \"b1851d1b13594e71840103c11a37a669\",\n \"name\": \"系统设置\",\n \"pid\": \"0\",\n \"isShow\": 1,\n \"url\": \"/system\",\n \"sort\": 10,\n \"icon\": \"settings\",\n \"component\": \"Layout\",\n \"path\": \"/system\",\n \"meta\": {\n \"title\": \"系统设置\",\n \"icon\": \"settings\"\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"39be13ef6f0745568c80bf35202ddb2b\",\n \"name\": \"菜单管理\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/menu/menu-list\",\n \"sort\": 10,\n \"icon\": \"menu\",\n \"component\": \"/system/menu/menu-list\",\n \"path\": \"/system/menu/menu-list\",\n \"meta\": {\n \"title\": \"菜单管理\",\n \"icon\": \"menu\"\n }\n }, {\n \"id\": \"8e9455740091486c914495cfb0c7faa5\",\n \"name\": \"角色管理\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/role/role-list\",\n \"sort\": 40,\n \"icon\": \"role\",\n \"component\": \"/system/role/role-list\",\n \"path\": \"/system/role/role-list\",\n \"meta\": {\n \"title\": \"角色管理\",\n \"icon\": \"role\"\n }\n }, {\n \"id\": \"06b8a427e4cd4c1ba11752070f565f20\",\n \"name\": \"用户管理\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/user/user-list\",\n \"sort\": 50,\n \"icon\": \"user\",\n \"component\": \"/system/user/user-list\",\n \"path\": \"/system/user/user-list\",\n \"meta\": {\n \"title\": \"用户管理\",\n \"icon\": \"user\"\n }\n }, {\n \"id\": \"c5f407478c4e4c9cbcdbee6389d2c909\",\n \"name\": \"数据字典\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/dict/dict-list\",\n \"sort\": 60,\n \"icon\": \"dict\",\n \"component\": \"/system/dict/dict-list\",\n \"path\": \"/system/dict/dict-list\",\n \"meta\": {\n \"title\": \"数据字典\",\n \"icon\": \"dict\"\n }\n }]\n }, {\n \"id\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"name\": \"一些例子\",\n \"pid\": \"0\",\n \"isShow\": 1,\n \"url\": \"/examples\",\n \"sort\": 20,\n \"icon\": \"examples\",\n \"component\": \"Layout\",\n \"path\": \"/examples\",\n \"meta\": {\n \"title\": \"一些例子\",\n \"icon\": \"examples\"\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"dc332875-831e-4937-86ff-0c7420915ce9\",\n \"name\": \"三级联动\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/three-linkage\",\n \"sort\": 10,\n \"icon\": \"\",\n \"component\": \"/examples/three-linkage\",\n \"path\": \"/examples/three-linkage\",\n \"meta\": {\n \"title\": \"三级联动\",\n \"icon\": \"\"\n }\n }, {\n \"id\": \"f09410d5-5043-4164-9f68-8d135de71b29\",\n \"name\": \"上传文件\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/upload-file\",\n \"sort\": 20,\n \"icon\": \"\",\n \"component\": \"/examples/upload-file\",\n \"path\": \"/examples/upload-file\",\n \"meta\": {\n \"title\": \"上传文件\",\n \"icon\": \"\"\n }\n }, {\n \"id\": \"74c852ea-be4b-4533-b146-cfbd776045d5\",\n \"name\": \"富文本\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/ueditor-example\",\n \"sort\": 30,\n \"icon\": \"\",\n \"component\": \"/examples/ueditor-example\",\n \"path\": \"/examples/ueditor-example\",\n \"meta\": {\n \"title\": \"富文本\",\n \"icon\": \"\"\n }\n }, {\n \"id\": \"91bdb7d742a64a8c8a8fdc6d3bb61581\",\n \"name\": \"可编辑表格\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/editor-table\",\n \"sort\": 40,\n \"icon\": \"\",\n \"component\": \"/examples/editor-table\",\n \"path\": \"/examples/editor-table\",\n \"meta\": {\n \"title\": \"可编辑表格\",\n \"icon\": \"\"\n }\n }, {\n \"id\": \"0ca23f378d794b23b935d6045bb54915\",\n \"name\": \"页面设计\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/page-design\",\n \"sort\": 50,\n \"icon\": \"\",\n \"component\": \"/examples/page-design\",\n \"path\": \"/examples/page-design\",\n \"meta\": {\n \"title\": \"页面设计\",\n \"icon\": \"\"\n }\n }, {\n \"id\": \"2664b76cb2904227bce5b0f7d1dd6e7b\",\n \"name\": \"下拉框\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/select-example\",\n \"sort\": 60,\n \"icon\": \"\",\n \"component\": \"/examples/select-example\",\n \"path\": \"/examples/select-example\",\n \"meta\": {\n \"title\": \"下拉框\",\n \"icon\": \"\"\n }\n }]\n }, {\n \"id\": \"f481f745ef8f40deae861b57390f9130\",\n \"name\": \"测试\",\n \"pid\": \"0\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 30,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"测试\",\n \"icon\": null\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"2c0dfae696b84994981461231dd82599\",\n \"name\": \"1\",\n \"pid\": \"f481f745ef8f40deae861b57390f9130\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 40,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"1\",\n \"icon\": null\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"def5a6402307471498447e17e48daf32\",\n \"name\": \"1-1\",\n \"pid\": \"2c0dfae696b84994981461231dd82599\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 10,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"1-1\",\n \"icon\": null\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"dc2fc72b7b584cb4a1027a9abcce4269\",\n \"name\": \"1-1-1\",\n \"pid\": \"def5a6402307471498447e17e48daf32\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 10,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"1-1-1\",\n \"icon\": null\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"740eb175bb004427a91deecfe6551c78\",\n \"name\": \"1-1-1-1\",\n \"pid\": \"dc2fc72b7b584cb4a1027a9abcce4269\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 10,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"1-1-1-1\",\n \"icon\": null\n }\n }]\n }, {\n \"id\": \"4bf506637f094a38903345c906ca13f9\",\n \"name\": \"1-1-2\",\n \"pid\": \"def5a6402307471498447e17e48daf32\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 20,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"1-1-2\",\n \"icon\": null\n }\n }]\n }, {\n \"id\": \"3922bbc556b64e08b2caf77ee5690f1a\",\n \"name\": \"1-2\",\n \"pid\": \"2c0dfae696b84994981461231dd82599\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 30,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"1-2\",\n \"icon\": null\n }\n }]\n }, {\n \"id\": \"eb2f8b86ad994986862a705168da875b\",\n \"name\": \"测试2\",\n \"pid\": \"f481f745ef8f40deae861b57390f9130\",\n \"isShow\": 1,\n \"url\": null,\n \"sort\": 40,\n \"icon\": null,\n \"component\": \"Layout\",\n \"path\": \"/\",\n \"meta\": {\n \"title\": \"测试2\",\n \"icon\": null\n }\n }]\n }],\n \"timestamp\": 1641276761756,\n \"executeTime\": 7\n}", + "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [{\n \"id\": \"b1851d1b13594e71840103c11a37a669\",\n \"name\": \"系统设置\",\n \"pid\": \"0\",\n \"isShow\": 1,\n \"url\": \"/system\",\n \"sort\": 10,\n \"icon\": \"settings\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"Layout\",\n \"path\": \"/system\",\n \"meta\": {\n \"title\": \"系统设置\",\n \"icon\": \"settings\",\n \"keepAlive\": false\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"39be13ef6f0745568c80bf35202ddb2b\",\n \"name\": \"菜单管理\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/menu/menu-list\",\n \"sort\": 10,\n \"icon\": \"menu\",\n \"keepAlive\": 1,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/system/menu/menu-list\",\n \"path\": \"/system/menu/menu-list\",\n \"meta\": {\n \"title\": \"菜单管理\",\n \"icon\": \"menu\",\n \"keepAlive\": true\n }\n }, {\n \"id\": \"6f3594d0-5445-41e1-a13c-890a57485036\",\n \"name\": \"组织机构\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/office/office-list\",\n \"sort\": 20,\n \"icon\": \"office\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/system/office/office-list\",\n \"path\": \"/system/office/office-list\",\n \"meta\": {\n \"title\": \"组织机构\",\n \"icon\": \"office\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"8e9455740091486c914495cfb0c7faa5\",\n \"name\": \"角色管理\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/role/role-list\",\n \"sort\": 40,\n \"icon\": \"role\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/system/role/role-list\",\n \"path\": \"/system/role/role-list\",\n \"meta\": {\n \"title\": \"角色管理\",\n \"icon\": \"role\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"06b8a427e4cd4c1ba11752070f565f20\",\n \"name\": \"用户管理\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/user/user-list\",\n \"sort\": 50,\n \"icon\": \"user\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/system/user/user-list\",\n \"path\": \"/system/user/user-list\",\n \"meta\": {\n \"title\": \"用户管理\",\n \"icon\": \"user\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"c5f407478c4e4c9cbcdbee6389d2c909\",\n \"name\": \"数据字典\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/dict/dict-list\",\n \"sort\": 60,\n \"icon\": \"dict\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/system/dict/dict-list\",\n \"path\": \"/system/dict/dict-list\",\n \"meta\": {\n \"title\": \"数据字典\",\n \"icon\": \"dict\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"10fc3bdde0c642aea2af34d281a49cf9\",\n \"name\": \"测试数据\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/test/test-list\",\n \"sort\": 100,\n \"icon\": \"home\",\n \"keepAlive\": 1,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/system/test/test-list\",\n \"path\": \"/system/test/test-list\",\n \"meta\": {\n \"title\": \"测试数据\",\n \"icon\": \"home\",\n \"keepAlive\": true\n }\n }]\n }, {\n \"id\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"name\": \"一些例子\",\n \"pid\": \"0\",\n \"isShow\": 1,\n \"url\": \"/examples\",\n \"sort\": 20,\n \"icon\": \"examples\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"Layout\",\n \"path\": \"/examples\",\n \"meta\": {\n \"title\": \"一些例子\",\n \"icon\": \"examples\",\n \"keepAlive\": false\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"dc332875-831e-4937-86ff-0c7420915ce9\",\n \"name\": \"三级联动\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/three-linkage\",\n \"sort\": 10,\n \"icon\": \"\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/examples/three-linkage\",\n \"path\": \"/examples/three-linkage\",\n \"meta\": {\n \"title\": \"三级联动\",\n \"icon\": \"\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"f09410d5-5043-4164-9f68-8d135de71b29\",\n \"name\": \"上传文件\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/upload-file\",\n \"sort\": 20,\n \"icon\": \"\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/examples/upload-file\",\n \"path\": \"/examples/upload-file\",\n \"meta\": {\n \"title\": \"上传文件\",\n \"icon\": \"\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"74c852ea-be4b-4533-b146-cfbd776045d5\",\n \"name\": \"富文本\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/ueditor-example\",\n \"sort\": 30,\n \"icon\": \"\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/examples/ueditor-example\",\n \"path\": \"/examples/ueditor-example\",\n \"meta\": {\n \"title\": \"富文本\",\n \"icon\": \"\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"91bdb7d742a64a8c8a8fdc6d3bb61581\",\n \"name\": \"可编辑表格\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/editor-table\",\n \"sort\": 40,\n \"icon\": \"\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/examples/editor-table\",\n \"path\": \"/examples/editor-table\",\n \"meta\": {\n \"title\": \"可编辑表格\",\n \"icon\": \"\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"0ca23f378d794b23b935d6045bb54915\",\n \"name\": \"页面设计\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/page-design\",\n \"sort\": 50,\n \"icon\": \"\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/examples/page-design\",\n \"path\": \"/examples/page-design\",\n \"meta\": {\n \"title\": \"页面设计\",\n \"icon\": \"\",\n \"keepAlive\": false\n }\n }, {\n \"id\": \"2664b76cb2904227bce5b0f7d1dd6e7b\",\n \"name\": \"下拉框\",\n \"pid\": \"641253af-8ea1-4b5d-8bc3-a7165ef60ff2\",\n \"isShow\": 1,\n \"url\": \"/examples/select-example\",\n \"sort\": 60,\n \"icon\": \"\",\n \"keepAlive\": 0,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/examples/select-example\",\n \"path\": \"/examples/select-example\",\n \"meta\": {\n \"title\": \"下拉框\",\n \"icon\": \"\",\n \"keepAlive\": false\n }\n }]\n }, {\n \"id\": \"d7f8d052d4864bd285c575c3cf2dce69\",\n \"name\": \"低代码\",\n \"pid\": \"0\",\n \"isShow\": 1,\n \"url\": \"/lowcode\",\n \"sort\": 30,\n \"icon\": null,\n \"keepAlive\": 1,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"Layout\",\n \"path\": \"/lowcode\",\n \"meta\": {\n \"title\": \"低代码\",\n \"icon\": null,\n \"keepAlive\": true\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [{\n \"id\": \"9de78e0a6042469c891af82fbc21ba90\",\n \"name\": \"组件管理\",\n \"pid\": \"d7f8d052d4864bd285c575c3cf2dce69\",\n \"isShow\": 1,\n \"url\": \"/lowcode/component-list\",\n \"sort\": 10,\n \"icon\": null,\n \"keepAlive\": 1,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/lowcode/component-list\",\n \"path\": \"/lowcode/component-list\",\n \"meta\": {\n \"title\": \"组件管理\",\n \"icon\": null,\n \"keepAlive\": true\n }\n }, {\n \"id\": \"c7445e2ac6144a15a76d723607fbfb9d\",\n \"name\": \"接口管理\",\n \"pid\": \"d7f8d052d4864bd285c575c3cf2dce69\",\n \"isShow\": 1,\n \"url\": \"/lowcode/magic-editor\",\n \"sort\": 20,\n \"icon\": null,\n \"keepAlive\": 1,\n \"code\": null,\n \"componentname\": null,\n \"component\": \"/lowcode/magic-editor\",\n \"path\": \"/lowcode/magic-editor\",\n \"meta\": {\n \"title\": \"接口管理\",\n \"icon\": null,\n \"keepAlive\": true\n }\n }]\n }],\n \"timestamp\": 1646400974566,\n \"executeTime\": 41\n}", "description" : null, "requestBodyDefinition" : null, "responseBodyDefinition" : { @@ -158,6 +158,42 @@ "error" : "", "expression" : "", "children" : [ ] + }, { + "name" : "keepAlive", + "value" : "0", + "description" : "", + "required" : false, + "dataType" : "Integer", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "code", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "componentname", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] }, { "name" : "component", "value" : "Layout", @@ -217,6 +253,18 @@ "error" : "", "expression" : "", "children" : [ ] + }, { + "name" : "keepAlive", + "value" : "false", + "description" : "", + "required" : false, + "dataType" : "Boolean", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] } ] }, { "name" : "redirect", @@ -348,6 +396,42 @@ "error" : "", "expression" : "", "children" : [ ] + }, { + "name" : "keepAlive", + "value" : "1", + "description" : "", + "required" : false, + "dataType" : "Integer", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "code", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "componentname", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] }, { "name" : "component", "value" : "/system/menu/menu-list", @@ -407,6 +491,18 @@ "error" : "", "expression" : "", "children" : [ ] + }, { + "name" : "keepAlive", + "value" : "true", + "description" : "", + "required" : false, + "dataType" : "Boolean", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] } ] } ] } ] @@ -414,7 +510,7 @@ } ] }, { "name" : "timestamp", - "value" : "1641276761756", + "value" : "1646400974566", "description" : "", "required" : false, "dataType" : "Long", @@ -426,7 +522,7 @@ "children" : [ ] }, { "name" : "executeTime", - "value" : "7", + "value" : "41", "description" : "", "required" : false, "dataType" : "Object", @@ -454,8 +550,11 @@ var menus = db.select(""" sm.url, sm.sort, sm.icon, - sm.keep_alive - from sys_menu sm where 1=1 + sm.keep_alive, + sc.code, + sc.name component_name + from sys_menu sm + left join sys_component sc on sm.component_id = sc.id where 1=1 ?{userId != '1', and sm.id in ( select menu_id from sys_role_menu where role_id in ( diff --git a/data/magic-api/api/后台/菜单管理/获取菜单tree.ms b/data/magic-api/api/后台/菜单管理/获取菜单tree.ms index 99df5e1..4a48f5b 100644 --- a/data/magic-api/api/后台/菜单管理/获取菜单tree.ms +++ b/data/magic-api/api/后台/菜单管理/获取菜单tree.ms @@ -5,7 +5,7 @@ "groupId" : "67b2ce258e24491194b74992958c74aa", "name" : "获取菜单tree", "createTime" : null, - "updateTime" : 1644121674088, + "updateTime" : 1646402874965, "lock" : "0", "method" : "GET", "path" : "/tree", @@ -96,7 +96,7 @@ } ================================ var toTree = (list,pid) => select t.*,toTree(list,t.id) children from list t where t.pid = pid -var list = toTree(db.select('select id,name,pid,is_show,url,sort,permission,desc_ribe,icon,keep_alive from sys_menu where is_del = 0 order by sort'),'0') +var list = toTree(db.select('select id,name,pid,is_show,url,sort,permission,desc_ribe,icon,keep_alive,component_id from sys_menu where is_del = 0 order by sort'),'0') return { list: list, diff --git a/data/magic-api/api/后台/配置/获取所有配置.ms b/data/magic-api/api/后台/配置/获取所有配置.ms index 770dbb3..d122ddc 100644 --- a/data/magic-api/api/后台/配置/获取所有配置.ms +++ b/data/magic-api/api/后台/配置/获取所有配置.ms @@ -5,7 +5,7 @@ "groupId" : "5c36bdc1de454d6e9d1a464d87c96091", "name" : "获取所有配置", "createTime" : null, - "updateTime" : 1635576982955, + "updateTime" : 1646391487051, "lock" : "0", "method" : "GET", "path" : "/list", @@ -14,7 +14,7 @@ "requestBody" : "", "headers" : [ ], "paths" : [ ], - "responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1635043795053,\n \"executeTime\": null\n}", + "responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1646391479074,\n \"executeTime\": null\n}", "description" : null, "requestBodyDefinition" : null, "responseBodyDefinition" : { @@ -66,7 +66,7 @@ "children" : [ ] }, { "name" : "timestamp", - "value" : "1635043795053", + "value" : "1646391479074", "description" : "", "required" : false, "dataType" : "Long",