soc.sql 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. DELIMITER ??
  2. DROP PROCEDURE IF
  3. EXISTS schema_change ?? CREATE PROCEDURE schema_change () BEGIN
  4. IF
  5. NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'sys_org' AND COLUMN_NAME = 'breviary' ) THEN
  6. ALTER TABLE `sys_org` ADD COLUMN `breviary` VARCHAR ( 255 ) NULL COMMENT '机构缩略词';
  7. END IF;
  8. IF
  9. NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'core_safety_task' AND COLUMN_NAME = 'solid_id' ) THEN
  10. ALTER TABLE `core_safety_task`
  11. ADD COLUMN `solid_id` bigint NULL COMMENT '固定的id,用于识别多个副本是否属于同一个计划' AFTER `plan_id`;
  12. END IF;
  13. IF
  14. NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'core_safecheck_plan' AND COLUMN_NAME = 'publish_time' ) THEN
  15. ALTER TABLE `core_safecheck_plan`
  16. MODIFY COLUMN `parent_id` bigint NULL DEFAULT -1 COMMENT '下发父计划id' AFTER `id`,
  17. ADD COLUMN `solid_id` bigint NULL COMMENT '固定的id,用于识别多个副本是否属于同一个计划' AFTER `parent_id`,
  18. ADD COLUMN `parent_solid_id` bigint NULL COMMENT '固定的parentid,用于识别多个副本是否属于同一个计划' AFTER `solid_id`,
  19. ADD COLUMN `task_has_completed` int DEFAULT NULL COMMENT '1:表示有已完成的任务',
  20. ADD COLUMN `publish_time` datetime NULL COMMENT '最后一次下发时间' AFTER `task_has_completed`,
  21. ADD COLUMN `withdraw_time` datetime NULL COMMENT '最后一次撤回时间' AFTER `publish_time`,
  22. ADD COLUMN `effective_time` datetime NULL COMMENT '计划生效时间' AFTER `withdraw_time`;
  23. update core_safecheck_plan set publish_time =create_time WHERE publish_time is null and plan_status=1;
  24. update core_safecheck_plan set withdraw_time =create_time WHERE withdraw_time is null and plan_status=2;
  25. update core_safecheck_plan set effective_time =create_time WHERE effective_time is null and (plan_status=1 or plan_status=2);
  26. END IF;
  27. -- -- 预案演练表增加字段:最后一次下发时间/最后一次撤回时间/计划生效日期
  28. IF NOT EXISTS(SELECT *
  29. FROM information_schema.columns
  30. WHERE table_schema = DATABASE()
  31. AND table_name = 'core_drill_plan'
  32. AND column_name = 'publish_time') THEN
  33. ALTER TABLE core_drill_plan
  34. ADD COLUMN `publish_time` datetime NULL COMMENT '最后一次下发时间' AFTER `parent_id`,
  35. ADD COLUMN `withdraw_time` datetime NULL COMMENT '最后一次撤回时间' AFTER `publish_time`,
  36. ADD COLUMN `effective_time` datetime NULL COMMENT '计划生效日期' AFTER `withdraw_time`;
  37. update core_drill_plan set publish_time =update_time WHERE publish_time is null and plan_status=1;
  38. update core_drill_plan set withdraw_time =update_time WHERE withdraw_time is null and plan_status=2;
  39. update core_drill_plan set effective_time =update_time WHERE effective_time is null and (plan_status=1 or plan_status=2);
  40. END IF;
  41. --
  42. -- -- 预案演练表增加字段:最后一次下发时间/最后一次撤回时间/计划生效日期
  43. IF NOT EXISTS(SELECT *
  44. FROM information_schema.columns
  45. WHERE table_schema = DATABASE()
  46. AND table_name = 'core_edu_training_plan'
  47. AND column_name = 'publish_time') THEN
  48. ALTER TABLE core_edu_training_plan
  49. ADD COLUMN `publish_time` datetime NULL COMMENT '最后一次下发时间' AFTER `parent_id`,
  50. ADD COLUMN `withdraw_time` datetime NULL COMMENT '最后一次撤回时间' AFTER `publish_time`,
  51. ADD COLUMN `effective_time` datetime NULL COMMENT '计划生效日期' AFTER `withdraw_time`;
  52. update core_edu_training_plan set publish_time =update_time WHERE publish_time is null and plan_status=1;
  53. update core_edu_training_plan set withdraw_time =update_time WHERE withdraw_time is null and plan_status=2;
  54. update core_edu_training_plan set effective_time =update_time WHERE effective_time is null and (plan_status=1 or plan_status=2);
  55. END IF;
  56. IF
  57. NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'core_resumption_plan' AND COLUMN_NAME = 'solid_id' ) THEN
  58. ALTER TABLE `core_resumption_plan`
  59. MODIFY COLUMN `parent_id` bigint NULL DEFAULT -1 COMMENT '下发父计划id' AFTER `id`,
  60. ADD COLUMN `solid_id` bigint NULL COMMENT '固定的id,用于识别多个副本是否属于同一个计划' AFTER `parent_id`,
  61. ADD COLUMN `parent_solid_id` bigint NULL COMMENT '固定的parentid,用于识别多个副本是否属于同一个计划' AFTER `solid_id`;
  62. END IF;
  63. IF
  64. NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'core_resumption' AND COLUMN_NAME = 'solid_id' ) THEN
  65. ALTER TABLE `core_resumption`
  66. ADD COLUMN `solid_id` bigint NULL COMMENT '固定的id,用于识别多个副本是否属于同一个计划' AFTER `plan_id`,
  67. ADD COLUMN `parent_solid_id` bigint NULL COMMENT '固定的parentid,用于识别多个副本是否属于同一个计划' AFTER `solid_id`;
  68. END IF;
  69. IF
  70. EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'core_resumption_plan_to_point' AND COLUMN_NAME = 'effective_date' ) THEN
  71. ALTER TABLE `core_resumption_plan_to_point`
  72. DROP COLUMN `effective_date`;
  73. END IF;
  74. IF
  75. NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE () AND TABLE_NAME = 'core_resumption_plan' AND COLUMN_NAME = 'publish_time' ) THEN
  76. ALTER TABLE `core_resumption_plan`
  77. ADD COLUMN `publish_time` datetime NULL COMMENT '最后一次下发时间' AFTER `task_has_completed`,
  78. ADD COLUMN `withdraw_time` datetime NULL COMMENT '最后一次撤回时间' AFTER `publish_time`,
  79. ADD COLUMN `effective_time` datetime NULL COMMENT '计划生效时间' AFTER `withdraw_time`;
  80. update core_resumption_plan set publish_time =update_time WHERE publish_time is null and plan_status=1;
  81. update core_resumption_plan set withdraw_time =update_time WHERE withdraw_time is null and plan_status=2;
  82. update core_resumption_plan set effective_time =update_time WHERE effective_time is null and plan_status=1;
  83. END IF;
  84. END ??
  85. DELIMITER;
  86. CALL schema_change ();
  87. update sys_menu set component='safetycheck/plan/index' WHERE menu_name='检查任务下发' and menu_type='C' and platform_type='1';
  88. delete from sys_menu where id=1734903034555719682;
  89. INSERT INTO sys_menu (id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, perms, platform_type, icon, image_path, create_by, create_time, update_by, update_time, remark)
  90. VALUES (1734903034555719682, '导出安全保卫工作情况统计', 103, 8, '', null, null, 1, 0, 'F', '0', '0', 'system:dept:exportConstructionDetails', '1', null, null, null, now(), '', null, '');
  91. delete from sys_role_menu where menu_id =1734903034555719682;
  92. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (114, 1734903034555719682);
  93. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (115, 1734903034555719682);
  94. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (116, 1734903034555719682);
  95. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (117, 1734903034555719682);
  96. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (118, 1734903034555719682);
  97. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (119, 1734903034555719682);
  98. INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (120, 1734903034555719682);
  99. delete from sys_role_menu where menu_id in (select id from sys_menu where perms='core:eduTask:report' and menu_name='报表查看');
  100. delete from sys_menu where perms='core:eduTask:report' and menu_name='报表查看';
  101. delete from sys_dict_type where dict_type='monitor_org';
  102. INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark)
  103. VALUES ('调阅机构类型', 'monitor_org', '0', null, now(), null, now(), null);
  104. delete from sys_dict_data where dict_type='monitor_org';
  105. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
  106. VALUES (3, '行社', '3', 'monitor_org', null, 'default', 'N', '0', null, now(), null, now(), null);
  107. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
  108. VALUES (2, '营业网点', '4', 'monitor_org', null, 'default', 'N', '0', null, now(), null, now(), null);
  109. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
  110. VALUES (5, '离行式自助银行', '5', 'monitor_org', null, 'default', 'N', '0', null, now(), null, now(), null);
  111. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
  112. VALUES (6, '中心业务库', '6', 'monitor_org', null, 'default', 'N', '0', null, now(), null, now(), null);
  113. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
  114. VALUES (10, '监控中心', '10', 'monitor_org', null, 'default', 'N', '0', null, now(), null, now(), null);
  115. delete from `sys_menu` where id=01719892877586239490;
  116. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
  117. VALUES (01719892877586239490, '外包履职评价统计表', 1719287834364436482, 2, 'evaluateTable', 'evaluateTable/index', NULL, 1, 1, 'C', '0', '0', 'core:evaluateTask:statistics', '1', 'chart', NULL, '超级管理员', '2023-09-21 10:37:52', '超级管理员', '2023-09-22 09:42:43', '');
  118. UPDATE sys_menu set menu_type='C',perms='appquestion:list' WHERE platform_type=0 and menu_name='隐患问题清单';
  119. delete from sys_dict_data where dict_type='register_book_type' and dict_value='28';
  120. INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark)
  121. VALUES (28, '监控调阅登记簿', '28', 'register_book_type', null, 'default', 'N', '0', null, now(), null, now(), null);
  122. DELETE from `sys_dict_type` WHERE `dict_type`='app_question_status';
  123. DELETE from `sys_dict_data` WHERE `dict_type`='app_question_status';
  124. INSERT INTO `sys_dict_type` ( `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 'APP隐患问题状态', 'app_question_status', '0', '超级管理员', '2023-12-19 15:40:55', '', NULL, NULL);
  125. INSERT INTO `sys_dict_data` ( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 0, '待确认', '0', 'app_question_status', NULL, 'default', 'N', '0', '超级管理员', '2023-12-19 15:42:47', '', NULL, NULL);
  126. INSERT INTO `sys_dict_data` ( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 1, '提出异议', '1', 'app_question_status', NULL, 'default', 'N', '0', '超级管理员', '2023-12-19 15:42:59', '', NULL, NULL);
  127. INSERT INTO `sys_dict_data` ( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '已关闭', '3', 'app_question_status', NULL, 'default', 'N', '0', '超级管理员', '2023-12-19 15:43:23', '超级管理员', '2023-12-19 15:43:30', NULL);
  128. INSERT INTO `sys_dict_data` ( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 10, '待整改', '10', 'app_question_status', NULL, 'default', 'N', '0', '超级管理员', '2023-12-19 15:43:55', '', NULL, NULL);
  129. INSERT INTO `sys_dict_data` ( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 11, '已整改', '11', 'app_question_status', NULL, 'default', 'N', '0', '超级管理员', '2023-12-19 15:44:07', '超级管理员', '2023-12-19 15:44:31', NULL);
  130. INSERT INTO `sys_dict_data` ( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 12, '已逾期', '12', 'app_question_status', NULL, 'default', 'N', '0', '超级管理员', '2023-12-19 15:44:18', '', NULL, NULL);
  131. DELETE from sys_dict_data where dict_type in ('org_extend_standard');
  132. INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 1, 'GA38-2021', '1', 'org_extend_standard', NULL, 'default', 'N', '0', '超级管理员', '2023-09-14 16:57:04', '超级管理员', '2023-10-07 15:24:27', NULL);
  133. INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 2, 'GA38-2015', '2', 'org_extend_standard', NULL, 'default', 'N', '0', '超级管理员', '2023-09-14 16:57:10', '超级管理员', '2023-10-07 15:24:36', NULL);
  134. INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( 3, '未达标', '3', 'org_extend_standard', NULL, 'default', 'N', '0', '超级管理员', '2023-09-14 16:57:28', '超级管理员', '2023-10-07 15:24:43', NULL);
  135. -- 新增安全责任书签署层级字典
  136. DELETE from sys_dict_data where dict_type='sign_level' and dict_label='其他' limit 1;
  137. INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (0, '其他', '3', 'sign_level', NULL, 'default', 'N', '0', null, NOW(), null
  138. , NOW(), NULL);
  139. -- 增加演练范本详情菜单权限
  140. set @id = ( SELECT id FROM `sys_menu` where menu_name='演练范本详情' and perms='core:drillDictionary:query');
  141. DELETE from sys_role_menu where menu_id=@id;
  142. insert into sys_role_menu select DISTINCT id,@id from sys_role;
  143. -- 仅仅给超级管理员用,标记为删除状态,通过脚本维护了一条管理员与角色的关联数据,防止首页等依赖于登录用户角色信息的页面查询报错
  144. DELETE FROM `sys_role` WHERE `role_name`='超级管理员';
  145. INSERT INTO `sys_role` (`org_type`, `role_name`, `role_key`, `role_sort`, `data_scope`, `menu_check_strictly`, `dept_check_strictly`, `status`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ('1', '超级管理员', 'default', 0, 1, 1, 1, '0', 2, '超级管理员', '2023-12-07 17:14:07', '', NULL, '仅仅给超级管理员用,标记为删除状态,通过脚本维护了一条管理员与角色的关联数据,防止首页等依赖于登录用户角色信息的页面查询报错');
  146. DELETE FROM `sys_user_role` WHERE `role_id` = (SELECT id FROM `sys_role` WHERE `role_name`='超级管理员');
  147. INSERT INTO `sys_user_role` (`user_id`, `role_id`, `create_by`, `create_time`, `update_by`, `update_time`) SELECT 1 as `user_id`, id as `role_id`, '超级管理员' as `create_by`, '2023-09-17 19:57:06' as `create_time`, NULL, NULL FROM `sys_role` WHERE `role_name`='超级管理员';
  148. -- 修改演练周期字典排序
  149. update sys_dict_data set dict_sort=dict_value where dict_type='drill_plan_cycle';
  150. -- 演练新增每周每月的计划周期
  151. delete from sys_dict_data where dict_type='drill_plan_cycle' and dict_value in ('2','3');
  152. INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '每周', '2', 'drill_plan_cycle', NULL, 'default', 'N', '0', NULL, NOW(), NULL, NOW(), NULL);
  153. INSERT INTO `sys_dict_data`(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, '每月', '3', 'drill_plan_cycle', NULL, 'default', 'N', '0', NULL, NOW(), NULL, NOW(), NULL);
  154. -- 整改期限增加60天、180天内,360天内
  155. DELETE from sys_dict_data WHERE dict_type='rectification_deadline';
  156. INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (269, 1, '15天内', '15', 'rectification_deadline', NULL, 'default', 'N', '0', '超级管理员', '2023-09-01 16:58:56', 'jwx', '2023-12-26 16:36:34', NULL);
  157. INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (270, 2, '30天内', '30', 'rectification_deadline', NULL, 'default', 'N', '0', '超级管理员', '2023-09-01 17:00:07', 'jwx', '2023-12-26 16:36:40', NULL);
  158. INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (271, 4, '90天内', '90', 'rectification_deadline', NULL, 'default', 'N', '0', '超级管理员', '2023-09-01 17:00:17', 'jwx', '2023-12-26 16:37:04', NULL);
  159. INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (20231114968, 3, '60天内', '60', 'rectification_deadline', NULL, 'default', 'N', '0', '超级管理员', '2023-12-26 16:36:57', 'jwx', '2023-12-26 16:37:08', NULL);
  160. INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (20231114970, 5, '180天内', '180', 'rectification_deadline', NULL, 'default', 'N', '0', '超级管理员', '2023-12-26 16:37:23', '', NULL, NULL);
  161. INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (20231114972, 6, '360天内', '360', 'rectification_deadline', NULL, 'default', 'N', '0', '超级管理员', '2023-12-26 16:37:39', '', NULL, NULL);
  162. DROP TABLE IF EXISTS `sys_operating_type`;
  163. CREATE TABLE `sys_operating_type` (
  164. `id` bigint NOT NULL COMMENT '主键',
  165. `source_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料类型',
  166. `sort` int NULL DEFAULT NULL COMMENT '排序字段',
  167. `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  168. `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  169. `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  170. `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  171. PRIMARY KEY (`id`) USING BTREE
  172. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  173. -- ----------------------------
  174. -- Table structure for sys_operating
  175. -- ----------------------------
  176. DROP TABLE IF EXISTS `sys_operating`;
  177. CREATE TABLE `sys_operating` (
  178. `id` bigint NOT NULL COMMENT '主键',
  179. `source_id` bigint NULL DEFAULT NULL COMMENT '资料类型',
  180. `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件地址',
  181. `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名称',
  182. `sort` int NULL DEFAULT NULL COMMENT '排序字段',
  183. `file_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件类型',
  184. `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  185. `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  186. `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  187. `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  188. PRIMARY KEY (`id`) USING BTREE
  189. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  190. delete from sys_menu where menu_name = '手册类型';
  191. delete from sys_menu where menu_name = '操作手册';
  192. delete from sys_menu where menu_name = '操作手册配置';
  193. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01738858108249956353, '手册类型', 1739111245879676930, 12, 'operating', 'system/operating/type/index', NULL, 1, 0, 'C', '0', '0', '', '1', 'documentation', NULL, '超级管理员', '2023-12-24 17:44:14', '超级管理员', '2023-12-25 10:35:22', '');
  194. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01738865249262231553, '操作手册', 1739111245879676930, 13, 'operatingData', 'system/operating/data/index', NULL, 1, 0, 'C', '0', '0', '', '1', 'documentation', NULL, '超级管理员', '2023-12-24 18:12:36', '超级管理员', '2023-12-25 10:35:03', '');
  195. INSERT INTO `sys_menu` (`id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `platform_type`, `icon`, `image_path`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (01739111245879676930, '操作手册配置', 1, 15, 'opertion', NULL, NULL, 1, 0, 'M', '0', '0', NULL, '1', 'dict', NULL, '超级管理员', '2023-12-25 10:30:06', '', NULL, '');
  196. delete from sys_config where config_key = 'CUSTOMER_SERVICE';
  197. INSERT INTO `sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (202, '客服服务', 'CUSTOMER_SERVICE', '', 'Y', '超级管理员', '2023-12-25 10:16:37', '', NULL, NULL);