菜单权限 统一为 接口

This commit is contained in:
2025-12-10 11:47:45 +08:00
parent 78f37c8ef1
commit 6930ca132d

View File

@@ -88,7 +88,7 @@ public class LoadingRole implements CommandLineRunner {
Method parentNameMethod = annotationClass.getMethod("parentName"); Method parentNameMethod = annotationClass.getMethod("parentName");
String parentName = (String) parentNameMethod.invoke(annotation); String parentName = (String) parentNameMethod.invoke(annotation);
String parentId; String parentId;
String parentMenuSql = "select * from sys_menu where title=?"; // 查询菜单是否存在 String parentMenuSql = "select * from sys_menu where title=?"; // 查询菜单是否存在
@@ -140,8 +140,8 @@ public class LoadingRole implements CommandLineRunner {
} }
if (!title.equals(permissionName) || !fullPath.equals(url) || !httpMethod.equals(method1) || !parentId.equals(pid) || !"3".equals(type)) { if (!title.equals(permissionName) || !fullPath.equals(url) || !httpMethod.equals(method1) || !parentId.equals(pid) || !"3".equals(type)) {
sql = "update sys_menu set title=?, url=?, method=?, pid=? where menu_id=?"; sql = "update sys_menu set title=?,type=? url=?, method=?, pid=? where menu_id=?";
Db.updateBySql(sql, permissionName, fullPath, httpMethod, parentId, menuId); Db.updateBySql(sql, permissionName, 3, fullPath, httpMethod, parentId, menuId);
log.info("接口菜单修改成功, 旧名称: {}, 新菜单名称: {}", title, permissionName); log.info("接口菜单修改成功, 旧名称: {}, 新菜单名称: {}", title, permissionName);
} }
continue; continue;