接口目录

This commit is contained in:
2025-12-10 11:04:12 +08:00
parent f5b67ac11d
commit b7c037f63b
43 changed files with 219 additions and 239 deletions

View File

@@ -125,6 +125,7 @@ public class LoadingRole implements CommandLineRunner {
Long menuId = menu1.getLong("menu_id");
String title = menu1.getString("title");
String url = menu1.getString("url");
String type = menu1.getString("type");
String method1 = menu1.getString("method");
String permission = menu1.getString("permission");
String pid = menu1.getString("pid");
@@ -138,7 +139,7 @@ public class LoadingRole implements CommandLineRunner {
log.info("接口菜单添加成功, 菜单名称: {}, 菜单权限: {}", title, permission);
}
if (!title.equals(permissionName) || !fullPath.equals(url) || !httpMethod.equals(method1) || !parentId.equals(pid)) {
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);
log.info("接口菜单修改成功, 旧名称: {}, 新菜单名称: {}", title, permissionName);
@@ -147,7 +148,7 @@ public class LoadingRole implements CommandLineRunner {
}
sql = "INSERT INTO `czg_cashier`.`sys_menu` ( `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`, `active_menu`, `is_shop`, `url`, `method`, `pid`) VALUES " +
"(0, 2, ?, NULL, '', 2, '', '', b'0', b'0', b'0', ?, NULL, NULL, ?, NULL, NULL, 0, ?, ?, ?);";
"(0, 3, ?, NULL, '', 2, '', '', b'0', b'0', b'0', ?, NULL, NULL, ?, NULL, NULL, 0, ?, ?, ?);";
Db.insertBySql(sql, StrUtil.isNotBlank(permissionName) ? permissionName : s, s, DateUtil.date(), fullPath, httpMethod, parentId);
sql = "select * from sys_menu where permission=?";
Row info = Db.selectOneBySql(sql, s);