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); }