12_init_admin.sql 729 B

123456789101112131415161718192021
  1. DELETE FROM sys_role WHERE role_id = 1;
  2. INSERT INTO sys_role(role_id, role_name, role_code, remark)
  3. VALUES(1, '系统管理员', 'admin', '系统管理员');
  4. DELETE FROM sys_role_resource WHERE role_id = 1;
  5. INSERT INTO sys_role_resource(role_id, resource_id)
  6. VALUES
  7. (1, -1),
  8. (1, 1),
  9. (1, 11),
  10. (1, 12);
  11. DELETE FROM sys_user WHERE user_id = 1;
  12. INSERT INTO sys_user(`user_id`, `login_name`, `password`, `user_name`)
  13. -- VALUES(1, 'admin', '48FBFB2C03ABA5577F9B3BC3970510E4', '系统管理员');
  14. VALUES(1, 'admin', '48FBFB2C03ABA5577F9B3BC3970510E46B13D2C04584297AE22E15AF59CEFF1D', '系统管理员');
  15. -- 密码是:12345678
  16. DELETE FROM sys_user_role WHERE user_id = 1;
  17. INSERT INTO sys_user_role(user_id, role_id)
  18. VALUES(1, 1);