init.sql 1.25 KB
##初始的角色
insert into t_sys_role(id, code_name, role_name, pic, enable, create_date, update_date, is_super_admin,descriptions)
values(1, 'ROLE_ADMIN', '管理员', 1, 1, now(), now(), 0, '');

##默认的模块
insert into t_sys_module(id,p_id, name, group_type, enable, path, create_date, update_date, mapp_symbol)
values (1,null , '系统管理', 1, 1, null, now(), now(), null)
,(2, 1, '权限管理', 2, 1, null, now(), now(), null)
,(3, 2, '资源管理', 3, 1, 'permission/resource/list.html', now(), now(), '/resource')
,(4, 2, '模块管理', 3, 1, 'permission/module/list.html', now(), now(), '/module')
,(5, 2, '角色管理', 3, 1, 'permission/role/list.html', now(), now(), '/role')
,(6, 2, '用户管理', 3, 1, 'permission/user/list.html', now(), now(), '/user')
,(7, 2, '字典管理', 3, 1, 'permission/dictionary/list.html', now(), now(), '/dictionary');

##管理员角色和模块关联
insert into t_sys_role_modules(roles, modules)
values (1, 3)
,(1, 4)
,(1, 5)
,(1, 6)
,(1, 7);

##管理员用户 admin/admin
insert into t_sys_user(id, name, user_name, password, create_date, enabled)
values(1, '系统管理员', 'admin', '$2a$04$4C6Xdjbfsqrbn3oFvmUl3eOm4.31FmzV3gEhzMIJuM7Gni4DQ8xQe', now(), 1);
insert into t_sys_user_roles(users, roles)
values(1, 1);