代码生成:新增导入菜单SQL脚本
This commit is contained in:
parent
32fd0311b3
commit
458f60be07
@ -247,7 +247,7 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
|
||||
// 查询表信息
|
||||
GenTable table = selectGenTableById(tableId);
|
||||
|
||||
//设置生成的sys_menu6条记录的主键值
|
||||
//设置生成的sys_menu7条记录的主键值
|
||||
setMenuIds(table);
|
||||
// 设置主子表信息
|
||||
setSubTable(table);
|
||||
@ -297,7 +297,7 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
|
||||
GenTable table = genTableMapper.selectOneWithRelationsById(tableId);
|
||||
// 设置主子表信息
|
||||
setSubTable(table);
|
||||
//设置生成的sys_menu6条记录的主键值
|
||||
//设置生成的sys_menu7条记录的主键值
|
||||
setMenuIds(table);
|
||||
// 设置主键列信息
|
||||
setPkColumn(table);
|
||||
@ -414,7 +414,7 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
|
||||
GenTable table = genTableMapper.selectOneWithRelationsById(tableId);
|
||||
// 设置主子表信息
|
||||
setSubTable(table);
|
||||
//设置生成的sys_menu6条记录的主键值
|
||||
//设置生成的sys_menu7条记录的主键值
|
||||
setMenuIds(table);
|
||||
// 设置主键列信息
|
||||
setPkColumn(table);
|
||||
@ -547,7 +547,7 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置生成的sys_menu6条记录的主键值
|
||||
* 设置生成的sys_menu 7条记录的主键值
|
||||
* 日期时间格式YYYYMMDDHHMMSS转化为数值,然后+01
|
||||
*
|
||||
* @param table table
|
||||
@ -555,7 +555,7 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
|
||||
private void setMenuIds(GenTable table) {
|
||||
String nowStr = DateUtils.dateTimeNow();
|
||||
List<Long> 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);
|
||||
|
@ -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, '');
|
||||
|
@ -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, '');
|
||||
|
Loading…
Reference in New Issue
Block a user