SET FOREIGN_KEY_CHECKS=0;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_dept`  (
  `dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门id',
  `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父部门id 默认0',
  `ancestors` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '祖级列表',
  `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称',
  `order_num` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
  `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '负责人',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '部门状态（0停用 1正常）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标志（0代表存在 1代表删除）',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间',
  PRIMARY KEY (`dept_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_job`  (
  `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务ID',
  `job_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
  `job_group` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'DEFAULT' COMMENT '任务组名',
  `invoke_target` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串',
  `target_params` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '调用目标传入参数',
  `cron_expression` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'cron执行表达式',
  `misfire_policy` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '3' COMMENT '计划执行错误策略（1立即执行 2执行一次 3放弃执行）',
  `concurrent` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否并发执行（0禁止 1允许）',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '任务状态（0暂停 1正常）',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  PRIMARY KEY (`job_id`, `job_name`, `job_group`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调度任务调度表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_job_log`  (
  `job_log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID',
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名',
  `invoke_target` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串',
  `target_params` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '调用目标传入参数',
  `job_msg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '日志信息',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '执行状态（0失败 1正常）',
  `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
  `cost_time` bigint(20) NULL DEFAULT 0 COMMENT '消耗时间（毫秒）',
  PRIMARY KEY (`job_log_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '调度任务调度日志表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_log_login`  (
  `login_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '登录ID',
  `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户账号',
  `ipaddr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录IP地址',
  `login_location` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录地点',
  `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '浏览器类型',
  `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作系统',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '登录状态（0失败 1成功）',
  `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提示消息',
  `login_time` bigint(20) NULL DEFAULT 0 COMMENT '登录时间',
  PRIMARY KEY (`login_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统登录日志表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_log_operate`  (
  `oper_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '日志主键',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '模块标题',
  `business_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '业务类型（0其它 1新增 2修改 3删除 4授权 5导出 6导入 7强退 8清空数据）',
  `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '方法名称',
  `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '请求方式',
  `operator_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '操作人员类别（0其它 1后台用户 2手机端用户）',
  `oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作人员',
  `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '部门名称',
  `oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '请求URL',
  `oper_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主机地址',
  `oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作地点',
  `oper_param` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '请求参数',
  `oper_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作消息',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '操作状态（0异常 1正常）',
  `oper_time` bigint(20) NULL DEFAULT 0 COMMENT '操作时间',
  `cost_time` bigint(20) NULL DEFAULT 0 COMMENT '消耗时间（毫秒）',
  PRIMARY KEY (`oper_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_post`  (
  `post_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '岗位ID',
  `post_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位编码',
  `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
  `post_sort` int(11) NULL DEFAULT 0 COMMENT '显示顺序',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '状态（0停用 1正常）',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`post_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位信息表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_role_dept`  (
  `role_id` bigint(20) NOT NULL COMMENT '角色ID',
  `dept_id` bigint(20) NOT NULL COMMENT '部门ID',
  PRIMARY KEY (`role_id`, `dept_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色和部门关联表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_user`  (
  `user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
  `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号',
  `nick_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户昵称',
  `user_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'sys' COMMENT '用户类型（sys系统用户）',
  `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户邮箱',
  `phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号码',
  `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '用户性别（0未知 1男 2女）',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像地址',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码',
  `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '帐号状态（0停用 1正常）',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标志（0代表存在 1代表删除）',
  `login_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '最后登录IP',
  `login_date` bigint(20) NULL DEFAULT 0 COMMENT '最后登录时间',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '创建者',
  `create_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '更新者',
  `update_time` bigint(20) NULL DEFAULT 0 COMMENT '更新时间',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;

CREATE TABLE IF NOT EXISTS `omc_db`.`sys_user_post`  (
  `user_id` bigint(20) NOT NULL COMMENT '用户ID',
  `post_id` bigint(20) NOT NULL COMMENT '岗位ID',
  PRIMARY KEY (`user_id`, `post_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户与岗位关联表' ROW_FORMAT = Dynamic;

-- 数据插入

INSERT IGNORE INTO `omc_db`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, '用户管理-密码锁定时间', 'sys.user.lockTime', '10', 'Y', 'admin', 1693911541269, '', 0, '密码锁定时间,单位分钟（默认10分钟）');
INSERT IGNORE INTO `omc_db`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '用户管理-授权有效时间', 'sys.user.expiresIn', '120', 'Y', 'admin', 1693911541269, '', 0, '令牌有效期（默认120分钟）');
INSERT IGNORE INTO `omc_db`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (7, '用户管理-多端用户授权登录', 'sys.user.multi_login', 'true', 'Y', 'admin', 1693911541269, '', 0, '多端授权登录');

UPDATE `omc_db`.`sys_config` SET `config_name` = '用户管理-账号初始密码', `config_key` = 'sys.user.initPassword', `config_value` = 'Abcd@1234..', `config_type` = 'Y', `create_by` = 'admin', `create_time` = 1693908079656, `update_by` = '', `update_time` = 0, `remark` = '导入用户初始化密码 123456' WHERE `config_id` = 1;
UPDATE `omc_db`.`sys_config` SET `config_name` = '账号自助-验证码开关', `config_key` = 'sys.account.captchaEnabled', `config_value` = 'false', `config_type` = 'Y', `create_by` = 'admin', `create_time` = 1693908079667, `update_by` = '', `update_time` = 0, `remark` = '是否开启验证码功能（true开启，false关闭）' WHERE `config_id` = 2;
UPDATE `omc_db`.`sys_config` SET `config_name` = '账号自助-是否开启用户注册功能', `config_key` = 'sys.account.registerUser', `config_value` = 'false', `config_type` = 'Y', `create_by` = 'admin', `create_time` = 1693908079669, `update_by` = '', `update_time` = 0, `remark` = '是否开启注册用户功能（true开启，false关闭）' WHERE `config_id` = 3;
UPDATE `omc_db`.`sys_config` SET `config_name` = '用户管理-密码最大错误次数', `config_key` = 'sys.user.maxRetryCount', `config_value` = '5', `config_type` = 'Y', `create_by` = 'admin', `create_time` = 1693908079680, `update_by` = '', `update_time` = 0, `remark` = '密码最大错误次数' WHERE `config_id` = 4;
UPDATE `omc_db`.`sys_config` SET `config_name` = '测试', `config_key` = 'test', `config_value` = 'test', `config_type` = 'Y', `create_by` = 'admin', `create_time` = 1693911541269, `update_by` = 'admin', `update_time` = 1693911586418, `remark` = '测试' WHERE `config_id` = 100;

INSERT IGNORE INTO `omc_db`.`sys_dept` (`dept_id`, `parent_id`, `ancestors`, `dept_name`, `order_num`, `leader`, `phone`, `email`, `status`, `del_flag`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (100, 0, '0', '运维部', 0, 'admin', '', '', '1', '0', 'admin', 1697091866188, '', NULL);

INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (29, 0, '接口跟踪', 'Interface', 'trace_type', NULL, 'blue ', '1', 'admin', 1697443290808, '', 0, '接口跟踪');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (30, 1, '设备跟踪', 'Device', 'trace_type', NULL, 'gold', '1', 'admin', 1697443307336, 'admin', 1697443541082, '设备跟踪');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (31, 2, '用户跟踪', 'UE', 'trace_type', NULL, 'green', '1', 'admin', 1697443562042, 'admin', 1697443566327, '用户跟踪');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (32, 0, '下载', 'DOWNLOAD', 'operation_log_type', NULL, 'pink', '1', 'admin', 1697444092166, 'admin', 1697444104048, '下载DOWNLOAD');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (33, 1, '激活', 'Activation', 'operation_log_type', NULL, 'blue ', '1', 'admin', 1697444134968, '', 0, 'Activation激活');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (34, 2, '新增', 'ADD', 'operation_log_type', NULL, 'cyan', '1', 'admin', 1697444151864, 'admin', 1697444156095, 'ADD');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (35, 3, '其他', 'AUTO', 'operation_log_type', NULL, 'gold', '1', 'admin', 1697444199990, '', 0, 'AUTO');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (36, 4, '回退', 'BACK', 'operation_log_type', NULL, 'blue ', '1', 'admin', 1697444219836, '', 0, 'BACK');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (37, 5, '删除', 'DELETE', 'operation_log_type', NULL, 'red', '1', 'admin', 1697444242927, '', 0, '删除DELETE');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (38, 6, '分配', 'Distribute', 'operation_log_type', NULL, 'yellow', '1', 'admin', 1697444267174, '', 0, 'Distribute');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (39, 7, '导出', 'EXPORT', 'operation_log_type', NULL, 'green', '1', 'admin', 1697444289982, '', 0, 'EXPORT');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (40, 8, '查询', 'SELECT', 'operation_log_type', NULL, 'gold', '1', 'admin', 1697444311262, '', 0, 'SELECT');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (41, 9, '设置', 'SET', 'operation_log_type', NULL, NULL, '1', 'admin', 1697444336102, '', 0, 'SET');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (42, 10, '更新', 'UPDATE', 'operation_log_type', NULL, 'magenta', '1', 'admin', 1697444358599, '', 0, 'UPDATE');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (43, 11, '上传', 'UPLOAD', 'operation_log_type', NULL, 'yellow', '1', 'admin', 1697444378660, '', 0, 'UPLOAD');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (44, 12, '查看', 'View', 'operation_log_type', NULL, 'purple', '1', 'admin', 1697444400940, 'admin', 1697444414022, 'View');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (45, 0, '历史告警', '0', 'alarm_status', NULL, 'orange', '1', 'admin', 1697444554302, '', 0, '历史告警');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (46, 1, '活动告警', '1', 'alarm_status', NULL, 'pink', '1', 'admin', 1697444569120, '', 0, '活动告警');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (47, 0, '登录', '0', 'security_log_type', NULL, NULL, '1', 'admin', 1697444719117, '', 0, 'Login');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (48, 1, '登出', '1', 'security_log_type', NULL, 'cyan', '1', 'admin', 1697444738749, 'admin', 1697444742784, 'Logout');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (49, 2, '新增', '2', 'security_log_type', NULL, 'green', '1', 'admin', 1697444763116, 'admin', 1697444766525, 'Add');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (50, 3, '更新', '3', 'security_log_type', NULL, 'lime', '1', 'admin', 1697444786405, 'admin', 1697444795272, 'Update');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (51, 4, '删除', '4', 'security_log_type', NULL, NULL, '1', 'admin', 1697444809133, '', 0, 'Delete');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (52, 5, '锁定', '5', 'security_log_type', NULL, NULL, '1', 'admin', 1697444827514, 'admin', 1697444838485, 'Lock');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (53, 6, '解锁', '6', 'security_log_type', NULL, 'gold', '1', 'admin', 1697444882860, '', 0, 'Unlock');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (54, 7, '重置', '7', 'security_log_type', NULL, 'cyan', '1', 'admin', 1697444906929, '', 0, 'Restart');
INSERT IGNORE INTO `omc_db`.`sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `tag_class`, `tag_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (55, 8, '停用', '8', 'security_log_type', NULL, 'blue ', '1', 'admin', 1697444945199, 'admin', 1697445915268, 'Stop');

UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '未知', `dict_value` = '0', `dict_type` = 'sys_user_sex', `tag_class` = '', `tag_type` = '', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079577, `update_by` = '', `update_time` = 0, `remark` = '性别未知' WHERE `dict_code` = 1;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '男', `dict_value` = '1', `dict_type` = 'sys_user_sex', `tag_class` = '', `tag_type` = '', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079583, `update_by` = '', `update_time` = 0, `remark` = '性别男' WHERE `dict_code` = 2;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 3, `dict_label` = '女', `dict_value` = '2', `dict_type` = 'sys_user_sex', `tag_class` = '', `tag_type` = '', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079585, `update_by` = '', `update_time` = 0, `remark` = '性别女' WHERE `dict_code` = 3;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '显示', `dict_value` = '1', `dict_type` = 'sys_show_hide', `tag_class` = '', `tag_type` = 'success', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079587, `update_by` = '', `update_time` = 0, `remark` = '显示菜单' WHERE `dict_code` = 4;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '隐藏', `dict_value` = '0', `dict_type` = 'sys_show_hide', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079589, `update_by` = '', `update_time` = 0, `remark` = '隐藏菜单' WHERE `dict_code` = 5;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '正常', `dict_value` = '1', `dict_type` = 'sys_normal_disable', `tag_class` = '', `tag_type` = 'success', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079591, `update_by` = '', `update_time` = 0, `remark` = '正常状态' WHERE `dict_code` = 6;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '停用', `dict_value` = '0', `dict_type` = 'sys_normal_disable', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079593, `update_by` = '', `update_time` = 0, `remark` = '停用状态' WHERE `dict_code` = 7;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '正常', `dict_value` = '1', `dict_type` = 'sys_job_status', `tag_class` = '', `tag_type` = 'success', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079595, `update_by` = '', `update_time` = 0, `remark` = '正常状态' WHERE `dict_code` = 8;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '暂停', `dict_value` = '0', `dict_type` = 'sys_job_status', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079597, `update_by` = '', `update_time` = 0, `remark` = '停用状态' WHERE `dict_code` = 9;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '默认', `dict_value` = 'DEFAULT', `dict_type` = 'sys_job_group', `tag_class` = '', `tag_type` = '', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079599, `update_by` = '', `update_time` = 0, `remark` = '默认分组' WHERE `dict_code` = 10;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '系统', `dict_value` = 'SYSTEM', `dict_type` = 'sys_job_group', `tag_class` = '', `tag_type` = '', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079601, `update_by` = '', `update_time` = 0, `remark` = '系统分组' WHERE `dict_code` = 11;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '是', `dict_value` = 'Y', `dict_type` = 'sys_yes_no', `tag_class` = '', `tag_type` = 'processing', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079602, `update_by` = '', `update_time` = 0, `remark` = '系统默认是' WHERE `dict_code` = 12;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '否', `dict_value` = 'N', `dict_type` = 'sys_yes_no', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079604, `update_by` = '', `update_time` = 0, `remark` = '系统默认否' WHERE `dict_code` = 13;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '通知', `dict_value` = '1', `dict_type` = 'sys_notice_type', `tag_class` = '', `tag_type` = 'warning', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079606, `update_by` = '', `update_time` = 0, `remark` = '通知' WHERE `dict_code` = 14;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '公告', `dict_value` = '2', `dict_type` = 'sys_notice_type', `tag_class` = '', `tag_type` = 'processing', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079608, `update_by` = '', `update_time` = 0, `remark` = '公告' WHERE `dict_code` = 15;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '正常', `dict_value` = '1', `dict_type` = 'sys_notice_status', `tag_class` = '', `tag_type` = 'success', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079610, `update_by` = '', `update_time` = 0, `remark` = '正常状态' WHERE `dict_code` = 16;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '关闭', `dict_value` = '0', `dict_type` = 'sys_notice_status', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079612, `update_by` = '', `update_time` = 0, `remark` = '关闭状态' WHERE `dict_code` = 17;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 99, `dict_label` = '其他', `dict_value` = '0', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'processing', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079613, `update_by` = '', `update_time` = 0, `remark` = '其他操作' WHERE `dict_code` = 18;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '新增', `dict_value` = '1', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'processing', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079615, `update_by` = '', `update_time` = 0, `remark` = '新增操作' WHERE `dict_code` = 19;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '修改', `dict_value` = '2', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'processing', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079618, `update_by` = '', `update_time` = 0, `remark` = '修改操作' WHERE `dict_code` = 20;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 3, `dict_label` = '删除', `dict_value` = '3', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079619, `update_by` = '', `update_time` = 0, `remark` = '删除操作' WHERE `dict_code` = 21;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 4, `dict_label` = '授权', `dict_value` = '4', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'success', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079621, `update_by` = '', `update_time` = 0, `remark` = '授权操作' WHERE `dict_code` = 22;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 5, `dict_label` = '导出', `dict_value` = '5', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'warning', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079623, `update_by` = '', `update_time` = 0, `remark` = '导出操作' WHERE `dict_code` = 23;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 6, `dict_label` = '导入', `dict_value` = '6', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'warning', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079625, `update_by` = '', `update_time` = 0, `remark` = '导入操作' WHERE `dict_code` = 24;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 7, `dict_label` = '强退', `dict_value` = '7', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079627, `update_by` = '', `update_time` = 0, `remark` = '强退操作' WHERE `dict_code` = 25;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 8, `dict_label` = '清空', `dict_value` = '8', `dict_type` = 'sys_oper_type', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079630, `update_by` = '', `update_time` = 0, `remark` = '清空操作' WHERE `dict_code` = 26;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 1, `dict_label` = '成功', `dict_value` = '1', `dict_type` = 'sys_common_status', `tag_class` = '', `tag_type` = 'success', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079632, `update_by` = '', `update_time` = 0, `remark` = '正常状态' WHERE `dict_code` = 27;
UPDATE `omc_db`.`sys_dict_data` SET `dict_sort` = 2, `dict_label` = '失败', `dict_value` = '0', `dict_type` = 'sys_common_status', `tag_class` = '', `tag_type` = 'error', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079633, `update_by` = '', `update_time` = 0, `remark` = '停用状态' WHERE `dict_code` = 28;

INSERT IGNORE INTO `omc_db`.`sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (101, '操作日志类型', 'operation_log_type', '1', 'admin', 1697443982999, '', 0, '操作日志类型');
INSERT IGNORE INTO `omc_db`.`sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (102, '告警日志类型', 'alarm_status', '1', 'admin', 1697444486172, '', 0, 'alarm_status');
INSERT IGNORE INTO `omc_db`.`sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (103, '安全日志类型', 'security_log_type', '1', 'admin', 1697444692163, '', 0, '安全日志类型');
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '用户性别', `dict_type` = 'sys_user_sex', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079540, `update_by` = '', `update_time` = 0, `remark` = '用户性别列表' WHERE `dict_id` = 1;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '菜单状态', `dict_type` = 'sys_show_hide', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079543, `update_by` = '', `update_time` = 0, `remark` = '菜单状态列表' WHERE `dict_id` = 2;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '系统开关', `dict_type` = 'sys_normal_disable', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079544, `update_by` = '', `update_time` = 0, `remark` = '系统开关列表' WHERE `dict_id` = 3;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '任务状态', `dict_type` = 'sys_job_status', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079546, `update_by` = '', `update_time` = 0, `remark` = '任务状态列表' WHERE `dict_id` = 4;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '任务分组', `dict_type` = 'sys_job_group', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079548, `update_by` = '', `update_time` = 0, `remark` = '任务分组列表' WHERE `dict_id` = 5;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '系统是否', `dict_type` = 'sys_yes_no', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079550, `update_by` = '', `update_time` = 0, `remark` = '系统是否列表' WHERE `dict_id` = 6;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '通知类型', `dict_type` = 'sys_notice_type', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079552, `update_by` = '', `update_time` = 0, `remark` = '通知类型列表' WHERE `dict_id` = 7;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '通知状态', `dict_type` = 'sys_notice_status', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079554, `update_by` = '', `update_time` = 0, `remark` = '通知状态列表' WHERE `dict_id` = 8;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '操作类型', `dict_type` = 'sys_oper_type', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079556, `update_by` = '', `update_time` = 0, `remark` = '操作类型列表' WHERE `dict_id` = 9;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '系统状态', `dict_type` = 'sys_common_status', `status` = '1', `create_by` = 'admin', `create_time` = 1693908079557, `update_by` = '', `update_time` = 0, `remark` = '登录状态列表' WHERE `dict_id` = 10;
UPDATE `omc_db`.`sys_dict_type` SET `dict_name` = '跟踪类型', `dict_type` = 'trace_type', `status` = '1', `create_by` = 'admin', `create_time` = 1693967758884, `update_by` = 'admin', `update_time` = 1697442483216, `remark` = '跟踪类型' WHERE `dict_id` = 100;

INSERT IGNORE INTO `omc_db`.`sys_job` (`job_id`, `job_name`, `job_group`, `invoke_target`, `target_params`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '触发执行', 'SYSTEM', 'simple', '{\"t\":10}', '0/10 * * * * ?', '3', '0', '0', 'admin', 1697091151523, '', 0, '');
INSERT IGNORE INTO `omc_db`.`sys_job` (`job_id`, `job_name`, `job_group`, `invoke_target`, `target_params`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '缓慢执行', 'SYSTEM', 'foo', '{\"t\":15}', '0/15 * * * * ?', '3', '0', '0', 'admin', 1697091151526, '', 0, '');
INSERT IGNORE INTO `omc_db`.`sys_job` (`job_id`, `job_name`, `job_group`, `invoke_target`, `target_params`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, '异常执行', 'SYSTEM', 'bar', '{\"t\":20}', '0/20 * * * * ?', '3', '0', '0', 'admin', 1697091151529, '', 0, '');

INSERT IGNORE INTO `omc_db`.`sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, 'ceo', '董事长', 1, '1', 'admin', 1697110106499, '', 0, '');

INSERT IGNORE INTO `omc_db`.`sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, 'se', '项目经理', 2, '1', 'admin', 1697110106502, '', 0, '');

INSERT IGNORE INTO `omc_db`.`sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, 'hr', '人力资源', 3, '1', 'admin', 1697110106504, '', 0, '');

INSERT IGNORE INTO `omc_db`.`sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (4, 'user', '普通员工', 4, '1', 'admin', 1697110106507, '', 0, '');

DELETE FROM `omc_db`.`sys_role` WHERE `role_id` = 3;

UPDATE `omc_db`.`sys_role` SET `role_name` = '管理员', `role_key` = 'admin', `role_sort` = 1, `data_scope` = '1', `menu_check_strictly` = '1', `dept_check_strictly` = '1', `status` = '1', `del_flag` = '0', `create_by` = 'admin', `create_time` = 1697091437683, `update_by` = '', `update_time` = 0, `remark` = '管理员' WHERE `role_id` = 1;

UPDATE `omc_db`.`sys_role` SET `role_name` = '普通角色', `role_key` = 'common', `role_sort` = 2, `data_scope` = '2', `menu_check_strictly` = '1', `dept_check_strictly` = '1', `status` = '1', `del_flag` = '0', `create_by` = 'admin', `create_time` = 1697091437686, `update_by` = 'admin', `update_time` = 1697511172013, `remark` = '普通角色' WHERE `role_id` = 2;

INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1);
INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 100);
INSERT IGNORE INTO `omc_db`.`sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1000);

INSERT IGNORE INTO `omc_db`.`sys_user` (`user_id`, `dept_id`, `user_name`, `nick_name`, `user_type`, `email`, `phonenumber`, `sex`, `avatar`, `password`, `status`, `del_flag`, `login_ip`, `login_date`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, 103, 'admin', '管理员', 'sys', '', '', '0', '', '$2a$10$S9ptcNBemEEZ7WhwrsF66O5h.VNznhdbICeqPu0PnOl2tmp.TSqte', '1', '0', '127.0.0.1', 1697091656500, 'admin', 1697091656500, 'admin', 1697525176913, '管理员');

INSERT IGNORE INTO `omc_db`.`sys_user_post` (`user_id`, `post_id`) VALUES (1, 1);

DELETE FROM `omc_db`.`sys_user_role` WHERE `user_id` = 176 AND `role_id` = 2;
DELETE FROM `omc_db`.`sys_user_role` WHERE `user_id` = 177 AND `role_id` = 2;
DELETE FROM `omc_db`.`sys_user_role` WHERE `user_id` = 200 AND `role_id` = 2;
DELETE FROM `omc_db`.`sys_user_role` WHERE `user_id` = 201 AND `role_id` = 2;

INSERT IGNORE INTO `omc_db`.`sys_user_role` (`user_id`, `role_id`) VALUES (2, 1);
INSERT IGNORE INTO `omc_db`.`sys_user_role` (`user_id`, `role_id`) VALUES (100, 2);

SET FOREIGN_KEY_CHECKS = 1;