xxl_job.sql 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : 百度云
  4. Source Server Type : MySQL
  5. Source Server Version : 50735
  6. Source Host : 180.76.231.231:6033
  7. Source Schema : xxl_job
  8. Target Server Type : MySQL
  9. Target Server Version : 50735
  10. File Encoding : 65001
  11. Date: 02/04/2023 15:54:32
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for xxl_job_group
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `xxl_job_group`;
  19. CREATE TABLE `xxl_job_group` (
  20. `id` int(11) NOT NULL AUTO_INCREMENT,
  21. `app_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行器AppName',
  22. `title` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '执行器名称',
  23. `address_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '执行器地址类型:0=自动注册、1=手动录入',
  24. `address_list` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行器地址列表,多地址逗号分隔',
  25. `update_time` datetime NULL DEFAULT NULL,
  26. PRIMARY KEY (`id`) USING BTREE
  27. ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  28. -- ----------------------------
  29. -- Records of xxl_job_group
  30. -- ----------------------------
  31. INSERT INTO `xxl_job_group` VALUES (1, 'xxl-job-executor-sample', '示例执行器', 0, NULL, '2023-04-02 15:54:15');
  32. INSERT INTO `xxl_job_group` VALUES (2, 'lottery-job', '抽奖系统任务调度', 0, 'http://192.168.0.4:9998/', '2023-04-02 15:54:15');
  33. -- ----------------------------
  34. -- Table structure for xxl_job_info
  35. -- ----------------------------
  36. DROP TABLE IF EXISTS `xxl_job_info`;
  37. CREATE TABLE `xxl_job_info` (
  38. `id` int(11) NOT NULL AUTO_INCREMENT,
  39. `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
  40. `job_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  41. `add_time` datetime NULL DEFAULT NULL,
  42. `update_time` datetime NULL DEFAULT NULL,
  43. `author` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '作者',
  44. `alarm_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报警邮件',
  45. `schedule_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'NONE' COMMENT '调度类型',
  46. `schedule_conf` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '调度配置,值含义取决于调度类型',
  47. `misfire_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'DO_NOTHING' COMMENT '调度过期策略',
  48. `executor_route_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器路由策略',
  49. `executor_handler` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务handler',
  50. `executor_param` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务参数',
  51. `executor_block_strategy` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '阻塞处理策略',
  52. `executor_timeout` int(11) NOT NULL DEFAULT 0 COMMENT '任务执行超时时间,单位秒',
  53. `executor_fail_retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '失败重试次数',
  54. `glue_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'GLUE类型',
  55. `glue_source` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'GLUE源代码',
  56. `glue_remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GLUE备注',
  57. `glue_updatetime` datetime NULL DEFAULT NULL COMMENT 'GLUE更新时间',
  58. `child_jobid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子任务ID,多个逗号分隔',
  59. `trigger_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '调度状态:0-停止,1-运行',
  60. `trigger_last_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '上次调度时间',
  61. `trigger_next_time` bigint(13) NOT NULL DEFAULT 0 COMMENT '下次调度时间',
  62. PRIMARY KEY (`id`) USING BTREE
  63. ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  64. -- ----------------------------
  65. -- Records of xxl_job_info
  66. -- ----------------------------
  67. INSERT INTO `xxl_job_info` VALUES (1, 1, '测试任务1', '2018-11-03 22:21:31', '2018-11-03 22:21:31', 'XXL', '', 'CRON', '0 0 0 * * ? *', 'DO_NOTHING', 'FIRST', 'demoJobHandler', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2018-11-03 22:21:31', '', 0, 0, 0);
  68. INSERT INTO `xxl_job_info` VALUES (2, 2, '活动状态扫描', '2023-03-01 14:30:05', '2023-03-01 14:30:05', 'seamew', '', 'CRON', '0 0 0 * * ? *', 'DO_NOTHING', 'FIRST', 'lotteryActivityStateJobHandler', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2023-03-01 14:30:05', '', 0, 0, 0);
  69. INSERT INTO `xxl_job_info` VALUES (3, 2, '扫描用户抽奖奖品发放MQ状态补偿', '2023-03-02 10:28:14', '2023-03-02 10:29:01', 'seamew', '', 'CRON', '0 0 0 * * ? *', 'DO_NOTHING', 'FIRST', 'lotteryOrderMQStateJobHandler', '1,2', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代码初始化', '2023-03-02 10:28:14', '', 0, 0, 0);
  70. -- ----------------------------
  71. -- Table structure for xxl_job_lock
  72. -- ----------------------------
  73. DROP TABLE IF EXISTS `xxl_job_lock`;
  74. CREATE TABLE `xxl_job_lock` (
  75. `lock_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '锁名称',
  76. PRIMARY KEY (`lock_name`) USING BTREE
  77. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  78. -- ----------------------------
  79. -- Records of xxl_job_lock
  80. -- ----------------------------
  81. INSERT INTO `xxl_job_lock` VALUES ('schedule_lock');
  82. -- ----------------------------
  83. -- Table structure for xxl_job_log
  84. -- ----------------------------
  85. DROP TABLE IF EXISTS `xxl_job_log`;
  86. CREATE TABLE `xxl_job_log` (
  87. `id` bigint(20) NOT NULL AUTO_INCREMENT,
  88. `job_group` int(11) NOT NULL COMMENT '执行器主键ID',
  89. `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
  90. `executor_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器地址,本次执行的地址',
  91. `executor_handler` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务handler',
  92. `executor_param` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务参数',
  93. `executor_sharding_param` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器任务分片参数,格式如 1/2',
  94. `executor_fail_retry_count` int(11) NOT NULL DEFAULT 0 COMMENT '失败重试次数',
  95. `trigger_time` datetime NULL DEFAULT NULL COMMENT '调度-时间',
  96. `trigger_code` int(11) NOT NULL COMMENT '调度-结果',
  97. `trigger_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '调度-日志',
  98. `handle_time` datetime NULL DEFAULT NULL COMMENT '执行-时间',
  99. `handle_code` int(11) NOT NULL COMMENT '执行-状态',
  100. `handle_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行-日志',
  101. `alarm_status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '告警状态:0-默认、1-无需告警、2-告警成功、3-告警失败',
  102. PRIMARY KEY (`id`) USING BTREE,
  103. INDEX `I_trigger_time`(`trigger_time`) USING BTREE,
  104. INDEX `I_handle_code`(`handle_code`) USING BTREE
  105. ) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  106. -- ----------------------------
  107. -- Records of xxl_job_log
  108. -- ----------------------------
  109. -- ----------------------------
  110. -- Table structure for xxl_job_log_report
  111. -- ----------------------------
  112. DROP TABLE IF EXISTS `xxl_job_log_report`;
  113. CREATE TABLE `xxl_job_log_report` (
  114. `id` int(11) NOT NULL AUTO_INCREMENT,
  115. `trigger_day` datetime NULL DEFAULT NULL COMMENT '调度-时间',
  116. `running_count` int(11) NOT NULL DEFAULT 0 COMMENT '运行中-日志数量',
  117. `suc_count` int(11) NOT NULL DEFAULT 0 COMMENT '执行成功-日志数量',
  118. `fail_count` int(11) NOT NULL DEFAULT 0 COMMENT '执行失败-日志数量',
  119. `update_time` datetime NULL DEFAULT NULL,
  120. PRIMARY KEY (`id`) USING BTREE,
  121. UNIQUE INDEX `i_trigger_day`(`trigger_day`) USING BTREE
  122. ) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  123. -- ----------------------------
  124. -- Records of xxl_job_log_report
  125. -- ----------------------------
  126. INSERT INTO `xxl_job_log_report` VALUES (1, '2023-03-01 00:00:00', 0, 6, 1, NULL);
  127. INSERT INTO `xxl_job_log_report` VALUES (2, '2023-02-28 00:00:00', 0, 0, 0, NULL);
  128. INSERT INTO `xxl_job_log_report` VALUES (3, '2023-02-27 00:00:00', 0, 0, 0, NULL);
  129. INSERT INTO `xxl_job_log_report` VALUES (4, '2023-03-02 00:00:00', 0, 8, 12, NULL);
  130. INSERT INTO `xxl_job_log_report` VALUES (5, '2023-03-03 00:00:00', 0, 0, 0, NULL);
  131. INSERT INTO `xxl_job_log_report` VALUES (6, '2023-03-04 00:00:00', 0, 0, 0, NULL);
  132. INSERT INTO `xxl_job_log_report` VALUES (7, '2023-03-05 00:00:00', 0, 0, 0, NULL);
  133. INSERT INTO `xxl_job_log_report` VALUES (8, '2023-03-06 00:00:00', 0, 0, 0, NULL);
  134. INSERT INTO `xxl_job_log_report` VALUES (9, '2023-03-07 00:00:00', 0, 0, 0, NULL);
  135. INSERT INTO `xxl_job_log_report` VALUES (10, '2023-03-08 00:00:00', 0, 0, 0, NULL);
  136. INSERT INTO `xxl_job_log_report` VALUES (11, '2023-03-09 00:00:00', 0, 0, 0, NULL);
  137. INSERT INTO `xxl_job_log_report` VALUES (12, '2023-03-10 00:00:00', 0, 0, 0, NULL);
  138. INSERT INTO `xxl_job_log_report` VALUES (13, '2023-03-11 00:00:00', 0, 0, 0, NULL);
  139. INSERT INTO `xxl_job_log_report` VALUES (14, '2023-03-12 00:00:00', 0, 0, 0, NULL);
  140. INSERT INTO `xxl_job_log_report` VALUES (15, '2023-03-13 00:00:00', 0, 0, 0, NULL);
  141. INSERT INTO `xxl_job_log_report` VALUES (16, '2023-03-14 00:00:00', 0, 0, 0, NULL);
  142. INSERT INTO `xxl_job_log_report` VALUES (17, '2023-03-15 00:00:00', 0, 0, 0, NULL);
  143. INSERT INTO `xxl_job_log_report` VALUES (18, '2023-03-16 00:00:00', 0, 0, 0, NULL);
  144. INSERT INTO `xxl_job_log_report` VALUES (19, '2023-03-17 00:00:00', 0, 0, 0, NULL);
  145. INSERT INTO `xxl_job_log_report` VALUES (20, '2023-03-18 00:00:00', 0, 0, 0, NULL);
  146. INSERT INTO `xxl_job_log_report` VALUES (21, '2023-03-19 00:00:00', 0, 0, 0, NULL);
  147. INSERT INTO `xxl_job_log_report` VALUES (22, '2023-03-20 00:00:00', 0, 0, 0, NULL);
  148. INSERT INTO `xxl_job_log_report` VALUES (23, '2023-03-21 00:00:00', 0, 0, 0, NULL);
  149. INSERT INTO `xxl_job_log_report` VALUES (24, '2023-03-22 00:00:00', 0, 0, 0, NULL);
  150. INSERT INTO `xxl_job_log_report` VALUES (25, '2023-03-23 00:00:00', 0, 0, 0, NULL);
  151. INSERT INTO `xxl_job_log_report` VALUES (26, '2023-03-24 00:00:00', 0, 0, 0, NULL);
  152. INSERT INTO `xxl_job_log_report` VALUES (27, '2023-03-25 00:00:00', 0, 0, 0, NULL);
  153. INSERT INTO `xxl_job_log_report` VALUES (28, '2023-03-26 00:00:00', 0, 0, 0, NULL);
  154. INSERT INTO `xxl_job_log_report` VALUES (29, '2023-03-27 00:00:00', 0, 0, 0, NULL);
  155. INSERT INTO `xxl_job_log_report` VALUES (30, '2023-03-28 00:00:00', 0, 0, 0, NULL);
  156. INSERT INTO `xxl_job_log_report` VALUES (31, '2023-03-29 00:00:00', 0, 0, 0, NULL);
  157. INSERT INTO `xxl_job_log_report` VALUES (32, '2023-03-30 00:00:00', 0, 0, 0, NULL);
  158. INSERT INTO `xxl_job_log_report` VALUES (33, '2023-03-31 00:00:00', 0, 0, 0, NULL);
  159. INSERT INTO `xxl_job_log_report` VALUES (34, '2023-04-01 00:00:00', 0, 0, 0, NULL);
  160. INSERT INTO `xxl_job_log_report` VALUES (35, '2023-04-02 00:00:00', 0, 0, 0, NULL);
  161. -- ----------------------------
  162. -- Table structure for xxl_job_logglue
  163. -- ----------------------------
  164. DROP TABLE IF EXISTS `xxl_job_logglue`;
  165. CREATE TABLE `xxl_job_logglue` (
  166. `id` int(11) NOT NULL AUTO_INCREMENT,
  167. `job_id` int(11) NOT NULL COMMENT '任务,主键ID',
  168. `glue_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'GLUE类型',
  169. `glue_source` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'GLUE源代码',
  170. `glue_remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'GLUE备注',
  171. `add_time` datetime NULL DEFAULT NULL,
  172. `update_time` datetime NULL DEFAULT NULL,
  173. PRIMARY KEY (`id`) USING BTREE
  174. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  175. -- ----------------------------
  176. -- Records of xxl_job_logglue
  177. -- ----------------------------
  178. -- ----------------------------
  179. -- Table structure for xxl_job_registry
  180. -- ----------------------------
  181. DROP TABLE IF EXISTS `xxl_job_registry`;
  182. CREATE TABLE `xxl_job_registry` (
  183. `id` int(11) NOT NULL AUTO_INCREMENT,
  184. `registry_group` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  185. `registry_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  186. `registry_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  187. `update_time` datetime NULL DEFAULT NULL,
  188. PRIMARY KEY (`id`) USING BTREE,
  189. INDEX `i_g_k_v`(`registry_group`, `registry_key`, `registry_value`) USING BTREE
  190. ) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  191. -- ----------------------------
  192. -- Records of xxl_job_registry
  193. -- ----------------------------
  194. INSERT INTO `xxl_job_registry` VALUES (116, 'EXECUTOR', 'lottery-job', 'http://192.168.0.4:9998/', '2023-04-02 15:54:00');
  195. -- ----------------------------
  196. -- Table structure for xxl_job_user
  197. -- ----------------------------
  198. DROP TABLE IF EXISTS `xxl_job_user`;
  199. CREATE TABLE `xxl_job_user` (
  200. `id` int(11) NOT NULL AUTO_INCREMENT,
  201. `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '账号',
  202. `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
  203. `role` tinyint(4) NOT NULL COMMENT '角色:0-普通用户、1-管理员',
  204. `permission` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限:执行器ID列表,多个逗号分割',
  205. PRIMARY KEY (`id`) USING BTREE,
  206. UNIQUE INDEX `i_username`(`username`) USING BTREE
  207. ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
  208. -- ----------------------------
  209. -- Records of xxl_job_user
  210. -- ----------------------------
  211. INSERT INTO `xxl_job_user` VALUES (1, 'admin', 'ffa569e559909982e0ec38b7889b97d3', 1, NULL);
  212. SET FOREIGN_KEY_CHECKS = 1;