From 458f60be0752e671bf37e0d69abe79489c804af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B0=8F=E7=8E=8B=E5=AD=90?= Date: Sat, 30 Mar 2024 17:04:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=EF=BC=9A?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=BC=E5=85=A5=E8=8F=9C=E5=8D=95SQL?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/generator/service/GenTableServiceImpl.java | 10 +++++----- .../src/main/resources/vm/sql/mysql/sql.vm | 4 ++++ .../src/main/resources/vm/sql/postgresql/sql.vm | 3 +++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java index ab2646e..042d62e 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java @@ -247,7 +247,7 @@ public class GenTableServiceImpl extends BaseServiceImpl menuIds = new ArrayList<>(); - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 7; i++) { menuIds.add(Long.valueOf(nowStr + "0" + i)); } table.setMenuIds(menuIds); diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/mysql/sql.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/mysql/sql.vm index 91e83b5..8c817bf 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/mysql/sql.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/mysql/sql.vm @@ -17,3 +17,7 @@ values(${table.menuIds[4]}, '${functionName}删除', ${table.menuIds[0]}, '4', insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values(${table.menuIds[5]}, '${functionName}导出', ${table.menuIds[0]}, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 1, sysdate(), 1, null, ''); + + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values(${table.menuIds[6]}, '${functionName}导入', ${table.menuIds[0]}, '6', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:import', '#', 1, sysdate(), 1, null, ''); diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/postgresql/sql.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/postgresql/sql.vm index 43cc72c..4da4d3f 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/postgresql/sql.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/postgresql/sql.vm @@ -17,3 +17,6 @@ values(${table.menuIds[4]}, '${functionName}删除', ${table.menuIds[0]}, '4', insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values(${table.menuIds[5]}, '${functionName}导出', ${table.menuIds[0]}, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 1, now(), 1, null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values(${table.menuIds[6]}, '${functionName}导入', ${table.menuIds[0]}, '6', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:import', '#', 1, now(), 1, null, '');