From ec4fbafd6df04f59c962e78a475a47085b28527e Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Thu, 18 Dec 2025 13:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=A1=20=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=20=E5=85=B3=E8=81=94=20=E6=8E=A5=E5=8F=A3=E6=9D=83?= =?UTF-8?q?=E9=99=90=20=E9=BB=98=E8=AE=A4=20=E6=8B=A5=E6=9C=89=20=E6=89=80?= =?UTF-8?q?=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/czg/LoadingRole.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/cash-common/cash-common-tools/src/main/java/com/czg/LoadingRole.java b/cash-common/cash-common-tools/src/main/java/com/czg/LoadingRole.java index f057ad546..28d48441b 100644 --- a/cash-common/cash-common-tools/src/main/java/com/czg/LoadingRole.java +++ b/cash-common/cash-common-tools/src/main/java/com/czg/LoadingRole.java @@ -128,15 +128,15 @@ public class LoadingRole implements CommandLineRunner { String method1 = menu1.getString("method"); String permission = menu1.getString("permission"); String pid = menu1.getString("pid"); - String listSql = "select * from sys_roles_menus where menu_id=? and role_id=?"; - List count1 = Db.selectListBySql(listSql, menuId, 1L); - - - if (count1.isEmpty()) { - sql = "INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (?, ?);"; - Db.insertBySql(sql, menuId, 1L); - log.info("接口菜单添加成功, 菜单名称: {}, 菜单权限: {}", title, permission); - } +// String listSql = "select * from sys_roles_menus where menu_id=? and role_id=?"; +// List count1 = Db.selectListBySql(listSql, menuId, 1L); +// +// +// if (count1.isEmpty()) { +// sql = "INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (?, ?);"; +// Db.insertBySql(sql, menuId, 1L); +// log.info("接口菜单添加成功, 菜单名称: {}, 菜单权限: {}", title, permission); +// } if (!title.equals(permissionName) || !fullPath.equals(url) || !httpMethod.equals(method1) || !parentId.equals(pid) || !"3".equals(type)) { sql = "update sys_menu set title=?,type=?, url=?, method=?, pid=? where menu_id=?"; @@ -153,8 +153,8 @@ public class LoadingRole implements CommandLineRunner { Row info = Db.selectOneBySql(sql, s); Long menuId = info.getLong("menu_id"); - sql = "INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (?, ?);"; - Db.insertBySql(sql, menuId, 1L); +// sql = "INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (?, ?);"; +// Db.insertBySql(sql, menuId, 1L); log.info("接口菜单添加成功, 菜单名称: {}, 菜单权限: {}", s, s); }