role_management_init.sql 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /*
  2. 角色管理初始化脚本
  3. 基于角色管理清单生成,包含:
  4. 1. 子系统表 (t_sys_app) INSERT 语句 - 6个子系统
  5. 2. 角色表 (t_sys_role) INSERT 语句 - 15个角色
  6. 3. 用户表 (t_sys_user) INSERT 语句 - 15个用户
  7. 4. 用户角色关联表 (t_sys_user_role) INSERT 语句 - 15条关联
  8. 5. 用户详情表 (t_sys_user_profile) INSERT 语句 - 15条档案
  9. 6. 角色应用关联表 (t_sys_role_app) INSERT 语句 - 15条关联
  10. 所有用户默认密码: 123456 (bcrypt加密,cost=12)
  11. */
  12. SET NAMES utf8mb4;
  13. SET FOREIGN_KEY_CHECKS = 0;
  14. -- ============================================================
  15. -- 1. 子系统表 (t_sys_app)
  16. -- ============================================================
  17. INSERT INTO `t_sys_app` (`id`, `name`, `app_key`, `app_secret`, `description`, `home_url`, `icon_url`, `redirect_uris`, `scope`, `is_active`, `is_trusted`, `access_token_expires`, `refresh_token_expires`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('a1b2c3d4-0001-4000-8000-000000000001', '采集平台', '3PNhrQRejIutH9SKIHJDsWnxiEDpnrzh', '4e5S2HKp0iHKwVLmrQu25TV3e0n507nkROObHCq6kbfV4LtdAG4X9K5vYlwnlH0V', '数据采集与提取平台', NULL, NULL, '[]', '["profile", "email"]', 1, 0, 7200, 2592000, 'system', NOW(), NULL, NOW());
  18. INSERT INTO `t_sys_app` (`id`, `name`, `app_key`, `app_secret`, `description`, `home_url`, `icon_url`, `redirect_uris`, `scope`, `is_active`, `is_trusted`, `access_token_expires`, `refresh_token_expires`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('a1b2c3d4-0002-4000-8000-000000000002', '样本中心', 'WviiGL8KQE20tQhmhQPQhhJ5QpFK51F6', '9WXP88hEHJiHRSiUdmx7ip5oQPzY0bnJNsEswQoO4sk6juCplyJTcnAiZsv7e3lJ', '样本数据管理中心', NULL, NULL, '["http://192.168.92.61/auth/callback"]', '["profile", "email"]', 1, 0, 7200, 2592000, 'system', NOW(), NULL, NOW());
  19. INSERT INTO `t_sys_app` (`id`, `name`, `app_key`, `app_secret`, `description`, `home_url`, `icon_url`, `redirect_uris`, `scope`, `is_active`, `is_trusted`, `access_token_expires`, `refresh_token_expires`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('a1b2c3d4-0003-4000-8000-000000000003', '标注平台', 'nlKLQJdJK3f5ub7UDfQ_E71z2Lo3YSQx', 'wh0HU_9T83rYMjfLFToNxFOKcrk_8H7Ba_27nNGlPqtTf9ROCytsOgp2ue0ol5mm', '数据标注平台(图片、文本)', NULL, NULL, '["http://192.168.92.61:9003/auth/callback"]', '["profile", "email"]', 1, 0, 7200, 2592000, 'system', NOW(), NULL, NOW());
  20. INSERT INTO `t_sys_app` (`id`, `name`, `app_key`, `app_secret`, `description`, `home_url`, `icon_url`, `redirect_uris`, `scope`, `is_active`, `is_trusted`, `access_token_expires`, `refresh_token_expires`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('a1b2c3d4-0004-4000-8000-000000000004', 'MaaS基础', 'jdlUTeabvYWzuv5SZquDXSBHIgyUFNeX', 'xdsO2JhjrbSvcIaNoyw1btucY3PRet4iLFEWk7J5s6LCApycJiQ0AOOi27EutQwO', 'MaaS基础容器管理平台', NULL, NULL, '[]', '["profile", "email"]', 1, 0, 7200, 2592000, 'system', NOW(), NULL, NOW());
  21. INSERT INTO `t_sys_app` (`id`, `name`, `app_key`, `app_secret`, `description`, `home_url`, `icon_url`, `redirect_uris`, `scope`, `is_active`, `is_trusted`, `access_token_expires`, `refresh_token_expires`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('a1b2c3d4-0005-4000-8000-000000000005', '算力平台', '0SkYt2YdRx5xZjuMO15eWn6v4Dpz9UVr', 'GA7lJ9VnSLChF9uyms9E1sa899X3Ht1dvgZ0eFARuFSM1xTIfsnlPToWBMY17j5T', '算力资源管理平台', NULL, NULL, '[]', '["profile", "email"]', 1, 0, 7200, 2592000, 'system', NOW(), NULL, NOW());
  22. INSERT INTO `t_sys_app` (`id`, `name`, `app_key`, `app_secret`, `description`, `home_url`, `icon_url`, `redirect_uris`, `scope`, `is_active`, `is_trusted`, `access_token_expires`, `refresh_token_expires`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('a1b2c3d4-0006-4000-8000-000000000006', '智能体平台', 'kcoy9GEKTfCRUZOrwqOtce4vhiyXYjro', 'PNcpLCGXAOd6MSIs5WhQ52DyGEVcf8W45D5SLLXQcFCPij9ZZtssQYeGBPhbXZrp', '智能体编排与管理平台', NULL, NULL, '[]', '["profile", "email"]', 1, 0, 7200, 2592000, 'system', NOW(), NULL, NOW());
  23. -- ============================================================
  24. -- 2. 角色表 (t_sys_role)
  25. -- ============================================================
  26. -- 超级管理员
  27. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000001-0001-4000-8000-000000000000', '超级管理员', 'super_admin', '超级管理员,负责所有功能权限', 1, 'system', NOW(), NULL, NOW(), 1);
  28. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000001-0001-4000-8000-000000000001', '采集平台系统管理员', 'col_sys_admin', '采集平台系统管理员,负责系统各类参数配置及所有功能权限', 1, 'system', NOW(), NULL, NOW(), 1);
  29. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000002-0002-4000-8000-000000000002', '数据采集员', 'col_data_collector', '负责采集源配置、提取规则配置、提取数据维护管理及原始数据治理', 1, 'system', NOW(), NULL, NOW(), 1);
  30. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000003-0003-4000-8000-000000000003', '样本中心系统管理员', 'sam_sys_admin', '样本中心系统管理员,负责角色管理、菜单管理、字典管理、日志查询及所有功能权限', 1, 'system', NOW(), NULL, NOW(), 1);
  31. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000004-0004-4000-8000-000000000004', '数据操作员', 'sam_data_operator', '负责样本中心管理(知识库维护、文档管理、知识片段管理、检索引擎管理、图片管理中心、标签管理、任务管理中心)', 1, 'system', NOW(), NULL, NOW(), 1);
  32. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000005-0005-4000-8000-000000000005', '标注平台系统管理员', 'ann_sys_admin', '标注平台系统管理员,负责标注任务配置、任务分配、任务跟踪及所有功能权限', 1, 'system', NOW(), NULL, NOW(), 1);
  33. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000006-0006-4000-8000-000000000006', '标注操作员', 'ann_operator', '负责执行标注任务处理(图片、文本)', 1, 'system', NOW(), NULL, NOW(), 1);
  34. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000007-0007-4000-8000-000000000007', '标注任务查看员', 'ann_viewer', '负责查看标注任务执行情况', 1, 'system', NOW(), NULL, NOW(), 1);
  35. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000008-0008-4000-8000-000000000008', 'Maas基础系统管理员', 'mas_sys_admin', 'MaaS基础容器管理员,负责主机维护管理、虚拟机管理、存储管理等所有功能', 1, 'system', NOW(), NULL, NOW(), 1);
  36. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000009-0009-4000-8000-000000000009', '日常维护员', 'mas_maintainer', '负责跟踪MaaS平台运行情况,监控各资源,事件跟踪', 1, 'system', NOW(), NULL, NOW(), 1);
  37. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000010-0010-4000-8000-000000000010', '应用开发者', 'mas_app_developer', '负责各类应用虚拟机操作系统的管理(应用环境搭建、应用服务管理等)', 1, 'system', NOW(), NULL, NOW(), 1);
  38. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000011-0011-4000-8000-000000000011', '算力平台系统管理员', 'cmp_sys_admin', '算力平台系统管理员,负责公域模型维护、私域模型维护及所有功能权限', 1, 'system', NOW(), NULL, NOW(), 1);
  39. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000012-0012-4000-8000-000000000012', '算力平台开发者', 'cmp_developer', '负责私域模型、公域模型API Key申请,公域模型试用、金额充值、消费账单查看', 1, 'system', NOW(), NULL, NOW(), 1);
  40. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000013-0013-4000-8000-000000000013', '智能体平台系统管理员', 'agt_sys_admin', '智能体平台系统管理员,负责公域模型、私域模型接入配置及角色管理、用户管理、权限分配管理、资源授权', 1, 'system', NOW(), NULL, NOW(), 1);
  41. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000014-0014-4000-8000-000000000014', '智能体开发者', 'agt_developer', '负责智能体编排、测试、发布、知识库使用检索', 1, 'system', NOW(), NULL, NOW(), 1);
  42. INSERT INTO `t_sys_role` (`id`, `name`, `code`, `description`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`, `is_system`) VALUES ('r0000015-0015-4000-8000-000000000015', '智能体使用业务员', 'agt_business', '负责已发布智能体的使用', 1, 'system', NOW(), NULL, NOW(), 1);
  43. -- ============================================================
  44. -- 3. 用户表 (t_sys_user)
  45. -- ============================================================
  46. -- 超级管理员(密码: Admin@123!)
  47. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000000-0000-4000-8000-000000000000', 'super_admin', 'super_admin@lqai.com', NULL, '$2b$12$tWZvr1zw1d5hxD1mm4icWuaz3g/tUxdl2nKuPy1yt2VulSDAdWJIS', NULL, 1, 1, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  48. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000001-0001-4000-8000-000000000001', 'col_admin_001', 'col_admin_001@lqai.com', NULL, '$2b$12$FgpEw1gmRt415jOqnl82we0HesB4q2eCRRUw09krqXLSriIRF3HJG', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  49. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000002-0002-4000-8000-000000000002', 'col_user_002', 'col_user_002@lqai.com', NULL, '$2b$12$5FxupcqbBE48l9iQOfL6aOZEEWdFFiBqv5lOKIHCUGdctBod/.Cry', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  50. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000003-0003-4000-8000-000000000003', 'sam_admin_001', 'sam_admin_001@lqai.com', NULL, '$2b$12$fxw6e3ZGMGuslwVjcQ.mquaz7J7Bu1bbHmKHhWF/g.YvZdAGMC8k6', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  51. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000004-0004-4000-8000-000000000004', 'sam_user_002', 'sam_user_002@lqai.com', NULL, '$2b$12$/TQaym.jvKGqdcj3YAUK4uVkUI9dkNZQJ1Ma0Kb.v.pfPrGlo5f6y', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  52. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000005-0005-4000-8000-000000000005', 'ann_admin_001', 'ann_admin_001@lqai.com', NULL, '$2b$12$pMQUeqW.NXQPlPquoxALnekTNpKr2lvXRTUTS9Ls0hJ4/YnYxT8aa', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  53. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000006-0006-4000-8000-000000000006', 'ann_user_002', 'ann_user_002@lqai.com', NULL, '$2b$12$jfVrxbN6Ek30NeKDQQPZsOGU2m2zgpUkXRMlLFkEVUZXB5bi9S6Iq', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  54. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000007-0007-4000-8000-000000000007', 'ann_user_003', 'ann_user_003@lqai.com', NULL, '$2b$12$0pZZ0LHYAsxvk26cIWca9eZXm.84GWjEjBPMCKppyN7ndZLpjXPhu', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  55. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000008-0008-4000-8000-000000000008', 'mas_admin_001', 'mas_admin_001@lqai.com', NULL, '$2b$12$a5v4KGMR5D2mVvY9wKlEPOZIbo5kzcXMYDhpw0iFV.ZG11DcQQEBW', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  56. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000009-0009-4000-8000-000000000009', 'mas_user_002', 'mas_user_002@lqai.com', NULL, '$2b$12$WyJ5Fe.ZC/dHpnIcJmIN2.BVos48vWjy/Dz5WuGliDqRrxJe1J5LK', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  57. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000010-0010-4000-8000-000000000010', 'mas_user_003', 'mas_user_003@lqai.com', NULL, '$2b$12$GFKLhBUEoIzAPgKaW1N80.Z0YSSQqcRIyF5YOJMPi3XmHOAx/0z1q', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  58. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000011-0011-4000-8000-000000000011', 'cmp_admin_001', 'cmp_admin_001@lqai.com', NULL, '$2b$12$UP.X/xgNriBGiRe6bZrCC.Wgq/TnstVqIsOTi88b0F4hoFvuDW7Ma', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  59. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000012-0012-4000-8000-000000000012', 'cmp_user_002', 'cmp_user_002@lqai.com', NULL, '$2b$12$UaUTN3yu1NkumjWfpg4WPOKiQicGzhn2xzXGcDo8XWFjk4dk5wRZ.', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  60. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000013-0013-4000-8000-000000000013', 'agt_admin_001', 'agt_admin_001@lqai.com', NULL, '$2b$12$3xwLMoNxEtuya9./hYN8J.YWHvLrxtJIfTdds04w9xvikJNxK1ApS', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  61. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000014-0014-4000-8000-000000000014', 'agt_user_002', 'agt_user_002@lqai.com', NULL, '$2b$12$NWLICs0eAljkdXIC/7Ifpe42pdKEuO675wO0i7Dv3k24W2rsRsKrS', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  62. INSERT INTO `t_sys_user` (`id`, `username`, `email`, `phone`, `password_hash`, `avatar_url`, `is_active`, `is_superuser`, `last_login_at`, `last_login_ip`, `failed_login_attempts`, `locked_until`, `is_deleted`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('u0000015-0015-4000-8000-000000000015', 'agt_user_003', 'agt_user_003@lqai.com', NULL, '$2b$12$5ErCJlkCPzTu5KtdWNoBZ.fewUE09ozqbDnbC2BW4p./Bg9SZHH2G', NULL, 1, 0, NULL, NULL, 0, NULL, 0, 'system', NOW(), NULL, NOW());
  63. -- ============================================================
  64. -- 4. 用户角色关联表 (t_sys_user_role)
  65. -- ============================================================
  66. -- 超级管理员关联
  67. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000000-0000-4000-8000-000000000000', 'u0000000-0000-4000-8000-000000000000', 'r0000001-0001-4000-8000-000000000000', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  68. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000001-0001-4000-8000-000000000001', 'u0000001-0001-4000-8000-000000000001', 'r0000001-0001-4000-8000-000000000001', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  69. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000002-0002-4000-8000-000000000002', 'u0000002-0002-4000-8000-000000000002', 'r0000002-0002-4000-8000-000000000002', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  70. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000003-0003-4000-8000-000000000003', 'u0000003-0003-4000-8000-000000000003', 'r0000003-0003-4000-8000-000000000003', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  71. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000004-0004-4000-8000-000000000004', 'u0000004-0004-4000-8000-000000000004', 'r0000004-0004-4000-8000-000000000004', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  72. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000005-0005-4000-8000-000000000005', 'u0000005-0005-4000-8000-000000000005', 'r0000005-0005-4000-8000-000000000005', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  73. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000006-0006-4000-8000-000000000006', 'u0000006-0006-4000-8000-000000000006', 'r0000006-0006-4000-8000-000000000006', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  74. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000007-0007-4000-8000-000000000007', 'u0000007-0007-4000-8000-000000000007', 'r0000007-0007-4000-8000-000000000007', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  75. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000008-0008-4000-8000-000000000008', 'u0000008-0008-4000-8000-000000000008', 'r0000008-0008-4000-8000-000000000008', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  76. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000009-0009-4000-8000-000000000009', 'u0000009-0009-4000-8000-000000000009', 'r0000009-0009-4000-8000-000000000009', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  77. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000010-0010-4000-8000-000000000010', 'u0000010-0010-4000-8000-000000000010', 'r0000010-0010-4000-8000-000000000010', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  78. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000011-0011-4000-8000-000000000011', 'u0000011-0011-4000-8000-000000000011', 'r0000011-0011-4000-8000-000000000011', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  79. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000012-0012-4000-8000-000000000012', 'u0000012-0012-4000-8000-000000000012', 'r0000012-0012-4000-8000-000000000012', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  80. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000013-0013-4000-8000-000000000013', 'u0000013-0013-4000-8000-000000000013', 'r0000013-0013-4000-8000-000000000013', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  81. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000014-0014-4000-8000-000000000014', 'u0000014-0014-4000-8000-000000000014', 'r0000014-0014-4000-8000-000000000014', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  82. INSERT INTO `t_sys_user_role` (`id`, `user_id`, `role_id`, `assigned_by`, `assigned_at`, `expires_at`, `is_active`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('ur000015-0015-4000-8000-000000000015', 'u0000015-0015-4000-8000-000000000015', 'r0000015-0015-4000-8000-000000000015', 'system', NOW(), NULL, 1, 'system', NOW(), NULL, NOW());
  83. -- ============================================================
  84. -- 5. 用户详情表 (t_sys_user_profile)
  85. -- ============================================================
  86. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000000-0000-4000-8000-000000000000', 'u0000000-0000-4000-8000-000000000000', '超级管理员', 0, NULL, NULL, NULL, NULL, '超级管理员', NULL, 'system', NOW(), NULL, NOW());
  87. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000001-0001-4000-8000-000000000001', 'u0000001-0001-4000-8000-000000000001', '采集平台管理员', 0, NULL, NULL, NULL, NULL, '系统管理员', NULL, 'system', NOW(), NULL, NOW());
  88. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000002-0002-4000-8000-000000000002', 'u0000002-0002-4000-8000-000000000002', '数据采集员', 0, NULL, NULL, NULL, NULL, '数据采集员', NULL, 'system', NOW(), NULL, NOW());
  89. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000003-0003-4000-8000-000000000003', 'u0000003-0003-4000-8000-000000000003', '样本中心管理员', 0, NULL, NULL, NULL, NULL, '系统管理员', NULL, 'system', NOW(), NULL, NOW());
  90. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000004-0004-4000-8000-000000000004', 'u0000004-0004-4000-8000-000000000004', '样本操作员', 0, NULL, NULL, NULL, NULL, '数据操作员', NULL, 'system', NOW(), NULL, NOW());
  91. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000005-0005-4000-8000-000000000005', 'u0000005-0005-4000-8000-000000000005', '标注平台管理员', 0, NULL, NULL, NULL, NULL, '系统管理员', NULL, 'system', NOW(), NULL, NOW());
  92. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000006-0006-4000-8000-000000000006', 'u0000006-0006-4000-8000-000000000006', '标注员', 0, NULL, NULL, NULL, NULL, '标注操作员', NULL, 'system', NOW(), NULL, NOW());
  93. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000007-0007-4000-8000-000000000007', 'u0000007-0007-4000-8000-000000000007', '标注监查员', 0, NULL, NULL, NULL, NULL, '标注任务查看员', NULL, 'system', NOW(), NULL, NOW());
  94. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000008-0008-4000-8000-000000000008', 'u0000008-0008-4000-8000-000000000008', 'MaaS基础管理员', 0, NULL, NULL, NULL, NULL, '系统管理员', NULL, 'system', NOW(), NULL, NOW());
  95. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000009-0009-4000-8000-000000000009', 'u0000009-0009-4000-8000-000000000009', '运维工程师', 0, NULL, NULL, NULL, NULL, '日常维护员', NULL, 'system', NOW(), NULL, NOW());
  96. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000010-0010-4000-8000-000000000010', 'u0000010-0010-4000-8000-000000000010', '应用管理员', 0, NULL, NULL, NULL, NULL, '应用开发者', NULL, 'system', NOW(), NULL, NOW());
  97. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000011-0011-4000-8000-000000000011', 'u0000011-0011-4000-8000-000000000011', '算力平台管理员', 0, NULL, NULL, NULL, NULL, '系统管理员', NULL, 'system', NOW(), NULL, NOW());
  98. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000012-0012-4000-8000-000000000012', 'u0000012-0012-4000-8000-000000000012', '算法开发者', 0, NULL, NULL, NULL, NULL, '开发者', NULL, 'system', NOW(), NULL, NOW());
  99. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000013-0013-4000-8000-000000000013', 'u0000013-0013-4000-8000-000000000013', '智能体管理员', 0, NULL, NULL, NULL, NULL, '系统管理员', NULL, 'system', NOW(), NULL, NOW());
  100. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000014-0014-4000-8000-000000000014', 'u0000014-0014-4000-8000-000000000014', '智能体开发者', 0, NULL, NULL, NULL, NULL, '开发者', NULL, 'system', NOW(), NULL, NOW());
  101. INSERT INTO `t_sys_user_profile` (`id`, `user_id`, `real_name`, `gender`, `birth_date`, `address`, `company`, `department`, `position`, `extra_info`, `created_by`, `created_time`, `updated_by`, `updated_time`) VALUES ('up000015-0015-4000-8000-000000000015', 'u0000015-0015-4000-8000-000000000015', '业务推广员', 0, NULL, NULL, NULL, NULL, '业务员', NULL, 'system', NOW(), NULL, NOW());
  102. -- ============================================================
  103. -- 6. 角色应用关联表 (t_sys_role_app)
  104. -- ============================================================
  105. -- 采集平台 (app_id: a1b2c3d4-0001-4000-8000-000000000001)
  106. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000001-0001-4000-8000-000000000001', 'r0000001-0001-4000-8000-000000000001', 'a1b2c3d4-0001-4000-8000-000000000001', 'system', NOW());
  107. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000002-0002-4000-8000-000000000002', 'r0000002-0002-4000-8000-000000000002', 'a1b2c3d4-0001-4000-8000-000000000001', 'system', NOW());
  108. -- 样本中心 (app_id: a1b2c3d4-0002-4000-8000-000000000002)
  109. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000003-0003-4000-8000-000000000003', 'r0000003-0003-4000-8000-000000000003', 'a1b2c3d4-0002-4000-8000-000000000002', 'system', NOW());
  110. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000004-0004-4000-8000-000000000004', 'r0000004-0004-4000-8000-000000000004', 'a1b2c3d4-0002-4000-8000-000000000002', 'system', NOW());
  111. -- 标注平台 (app_id: a1b2c3d4-0003-4000-8000-000000000003)
  112. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000005-0005-4000-8000-000000000005', 'r0000005-0005-4000-8000-000000000005', 'a1b2c3d4-0003-4000-8000-000000000003', 'system', NOW());
  113. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000006-0006-4000-8000-000000000006', 'r0000006-0006-4000-8000-000000000006', 'a1b2c3d4-0003-4000-8000-000000000003', 'system', NOW());
  114. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000007-0007-4000-8000-000000000007', 'r0000007-0007-4000-8000-000000000007', 'a1b2c3d4-0003-4000-8000-000000000003', 'system', NOW());
  115. -- MaaS基础 (app_id: a1b2c3d4-0004-4000-8000-000000000004)
  116. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000008-0008-4000-8000-000000000008', 'r0000008-0008-4000-8000-000000000008', 'a1b2c3d4-0004-4000-8000-000000000004', 'system', NOW());
  117. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000009-0009-4000-8000-000000000009', 'r0000009-0009-4000-8000-000000000009', 'a1b2c3d4-0004-4000-8000-000000000004', 'system', NOW());
  118. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000010-0010-4000-8000-000000000010', 'r0000010-0010-4000-8000-000000000010', 'a1b2c3d4-0004-4000-8000-000000000004', 'system', NOW());
  119. -- 算力平台 (app_id: a1b2c3d4-0005-4000-8000-000000000005)
  120. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000011-0011-4000-8000-000000000011', 'r0000011-0011-4000-8000-000000000011', 'a1b2c3d4-0005-4000-8000-000000000005', 'system', NOW());
  121. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000012-0012-4000-8000-000000000012', 'r0000012-0012-4000-8000-000000000012', 'a1b2c3d4-0005-4000-8000-000000000005', 'system', NOW());
  122. -- 智能体平台 (app_id: a1b2c3d4-0006-4000-8000-000000000006)
  123. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000013-0013-4000-8000-000000000013', 'r0000013-0013-4000-8000-000000000013', 'a1b2c3d4-0006-4000-8000-000000000006', 'system', NOW());
  124. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000014-0014-4000-8000-000000000014', 'r0000014-0014-4000-8000-000000000014', 'a1b2c3d4-0006-4000-8000-000000000006', 'system', NOW());
  125. INSERT INTO `t_sys_role_app` (`id`, `role_id`, `app_id`, `created_by`, `created_time`) VALUES ('ra000015-0015-4000-8000-000000000015', 'r0000015-0015-4000-8000-000000000015', 'a1b2c3d4-0006-4000-8000-000000000006', 'system', NOW());
  126. SET FOREIGN_KEY_CHECKS = 1;