sql.vm 2.1 KB

1234567891011121314151617181920212223242526272829
  1. -- 菜单 SQL
  2. insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
  3. values(${table.menuId}, '${functionName}', '${parentMenuId}', '1', '/${moduleName}/${businessName}', 'C', '0', '${permissionPrefix}:view', '#', 'admin', sysdate, '', null, '${functionName}菜单');
  4. -- 按钮 SQL
  5. insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
  6. values(seq_sys_menu.nextval, '${functionName}查询', ${table.menuId}, '1', '#', 'F', '0', '${permissionPrefix}:list', '#', 'admin', sysdate, '', null, '');
  7. insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
  8. values(seq_sys_menu.nextval, '${functionName}新增', ${table.menuId}, '2', '#', 'F', '0', '${permissionPrefix}:add', '#', 'admin', sysdate, '', null, '');
  9. insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
  10. values(seq_sys_menu.nextval, '${functionName}修改', ${table.menuId}, '3', '#', 'F', '0', '${permissionPrefix}:edit', '#', 'admin', sysdate, '', null, '');
  11. insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
  12. values(seq_sys_menu.nextval, '${functionName}删除', ${table.menuId}, '4', '#', 'F', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate, '', null, '');
  13. insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
  14. values(seq_sys_menu.nextval, '${functionName}导出', ${table.menuId}, '5', '#', 'F', '0', '${permissionPrefix}:export', '#', 'admin', sysdate, '', null, '');
  15. #if($pkColumn.increment)
  16. -- ${tableName}主键序列
  17. create sequence seq_${tableName}
  18. increment by 1
  19. start with 10
  20. nomaxvalue
  21. nominvalue
  22. cache 20;
  23. #end