-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
使用 CosId 提供的雪花算法实现
- Loading branch information
Showing
7 changed files
with
84 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,45 +43,45 @@ INSERT IGNORE INTO `sys_dept` | |
(`id`, `name`, `parent_id`, `ancestors`, `description`, `sort`, `status`, `is_system`, `create_user`, `create_time`, `update_user`, `update_time`) | ||
VALUES | ||
(1, 'Xxx科技有限公司', 0, '0', '系统初始部门', 1, 1, b'1', 1, NOW(), NULL, NULL), | ||
(2, '天津总部', 1, '0,1', NULL, 1, 1, b'0', 1, NOW(), NULL, NULL), | ||
(3, '研发部', 2, '0,1,2', NULL, 1, 1, b'0', 1, NOW(), NULL, NULL), | ||
(4, 'UI部', 2, '0,1,2', NULL, 2, 1, b'0', 1, NOW(), NULL, NULL), | ||
(5, '测试部', 2, '0,1,2', NULL, 3, 1, b'0', 1, NOW(), NULL, NULL), | ||
(6, '运维部', 2, '0,1,2', NULL, 4, 1, b'0', 1, NOW(), NULL, NULL), | ||
(7, '研发一组', 3, '0,1,2,3', NULL, 1, 1, b'0', 1, NOW(), NULL, NULL), | ||
(8, '研发二组', 3, '0,1,2,3', NULL, 2, 2, b'0', 1, NOW(), NULL, NULL); | ||
(547887852587843590, '天津总部', 1, '0,1', NULL, 1, 1, b'0', 1, NOW(), NULL, NULL), | ||
(547888008188133385, '研发部', 547887852587843590, '0,1,2', NULL, 1, 1, b'0', 1, NOW(), NULL, NULL), | ||
(547888460711591948, 'UI部', 547887852587843590, '0,1,2', NULL, 2, 1, b'0', 1, NOW(), NULL, NULL), | ||
(547888483713155087, '测试部', 547887852587843590, '0,1,2', NULL, 3, 1, b'0', 1, NOW(), NULL, NULL), | ||
(547888505959743506, '运维部', 547887852587843590, '0,1,2', NULL, 4, 1, b'0', 1, NOW(), NULL, NULL), | ||
(547888556819873814, '研发一组', 547888008188133385, '0,1,2,3', NULL, 1, 1, b'0', 1, NOW(), NULL, NULL), | ||
(547888580614160409, '研发二组', 547888008188133385, '0,1,2,3', NULL, 2, 2, b'0', 1, NOW(), NULL, NULL); | ||
|
||
-- 初始化默认角色 | ||
INSERT IGNORE INTO `sys_role` | ||
(`id`, `name`, `code`, `data_scope`, `description`, `sort`, `status`, `is_system`, `create_user`, `create_time`, `update_user`, `update_time`) | ||
VALUES | ||
(1, '超级管理员', 'admin', 1, '系统初始角色', 1, 1, b'1', 1, NOW(), NULL, NULL), | ||
(2, '测试人员', 'test', 5, NULL, 2, 1, b'0', 1, NOW(), NULL, NULL); | ||
(547888897925840928, '测试人员', 'test', 5, NULL, 2, 1, b'0', 1, NOW(), NULL, NULL); | ||
|
||
-- 初始化默认用户:admin/admin123;test/123456 | ||
INSERT IGNORE INTO `sys_user` | ||
(`id`, `username`, `nickname`, `password`, `gender`, `email`, `phone`, `avatar`, `description`, `status`, `is_system`, `pwd_reset_time`, `dept_id`, `create_user`, `create_time`, `update_user`, `update_time`) | ||
VALUES | ||
(1, 'admin', '超级管理员', '9802815bcc5baae7feb1ae0d0566baf2', 1, '[email protected]', '18888888888', NULL, '系统初始用户', 1, b'1', NOW(), 1, 1, NOW(), NULL, NULL), | ||
(2, 'test', '测试员', '8e114197e1b33783a00542ad67e80516', 2, NULL, NULL, NULL, NULL, 2, b'0', NOW(), 5, 1, NOW(), NULL, NULL); | ||
(547889293968801831, 'test', '测试员', '8e114197e1b33783a00542ad67e80516', 2, NULL, NULL, NULL, NULL, 2, b'0', NOW(), 547888483713155087, 1, NOW(), NULL, NULL); | ||
|
||
-- 初始化默认角色和菜单关联数据 | ||
INSERT IGNORE INTO `sys_role_menu` | ||
(`role_id`, `menu_id`) | ||
VALUES | ||
(2, 1000), | ||
(2, 1010), | ||
(2, 1011), | ||
(2, 1012), | ||
(2, 1013), | ||
(2, 1014); | ||
(547889293968801831, 1000), | ||
(547889293968801831, 1010), | ||
(547889293968801831, 1011), | ||
(547889293968801831, 1012), | ||
(547889293968801831, 1013), | ||
(547889293968801831, 1014); | ||
|
||
-- 初始化默认角色和部门关联数据 | ||
INSERT IGNORE INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (2, 5); | ||
INSERT IGNORE INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (547888897925840928, 547888483713155087); | ||
|
||
-- 初始化默认用户和角色关联数据 | ||
INSERT IGNORE INTO `sys_user_role` | ||
(`user_id`, `role_id`) | ||
VALUES | ||
(1, 1), | ||
(2, 2); | ||
(547889293968801831, 547888897925840928); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters