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 cec06389a..2dcea7a92 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 @@ -88,7 +88,7 @@ public class LoadingRole implements CommandLineRunner { Method parentNameMethod = annotationClass.getMethod("parentName"); String parentName = (String) parentNameMethod.invoke(annotation); - + String parentId; 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)) { - sql = "update sys_menu set title=?, url=?, method=?, pid=? where menu_id=?"; - Db.updateBySql(sql, permissionName, fullPath, httpMethod, parentId, menuId); + sql = "update sys_menu set title=?,type=? url=?, method=?, pid=? where menu_id=?"; + Db.updateBySql(sql, permissionName, 3, fullPath, httpMethod, parentId, menuId); log.info("接口菜单修改成功, 旧名称: {}, 新菜单名称: {}", title, permissionName); } continue;