diff --git a/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml b/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
index 2bcb3cc01..2d07b04e1 100644
--- a/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
+++ b/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobInfoMapper.xml
@@ -1,247 +1,247 @@
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
-
-
-
-
+
+
+
+
-
- t.id,
- t.job_group,
- t.job_desc,
- t.add_time,
- t.update_time,
- t.author,
- t.alarm_email,
- t.schedule_type,
- t.schedule_conf,
- t.misfire_strategy,
- t.executor_route_strategy,
- t.executor_handler,
- t.executor_param,
- t.executor_block_strategy,
- t.executor_timeout,
- t.executor_fail_retry_count,
- t.glue_type,
- t.glue_source,
- t.glue_remark,
- t.glue_updatetime,
- t.child_jobid,
- t.trigger_status,
- t.trigger_last_time,
- t.trigger_next_time
-
+
+ t.id,
+ t.job_group,
+ t.job_desc,
+ t.add_time,
+ t.update_time,
+ t.author,
+ t.alarm_email,
+ t.schedule_type,
+ t.schedule_conf,
+ t.misfire_strategy,
+ t.executor_route_strategy,
+ t.executor_handler,
+ t.executor_param,
+ t.executor_block_strategy,
+ t.executor_timeout,
+ t.executor_fail_retry_count,
+ t.glue_type,
+ t.glue_source,
+ t.glue_remark,
+ t.glue_updatetime,
+ t.child_jobid,
+ t.trigger_status,
+ t.trigger_last_time,
+ t.trigger_next_time
+
-
-
- SELECT count(1)
- FROM xxl_job_info AS t
-
-
- AND t.job_group = #{jobGroup}
-
+
+ SELECT count(1)
+ FROM xxl_job_info AS t
+
+
+ AND t.job_group = #{jobGroup}
+
AND t.trigger_status = #{triggerStatus}
-
- AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
-
-
- AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
-
-
- AND t.author like CONCAT(CONCAT('%', #{author}), '%')
-
-
-
+
+ AND t.job_desc like CONCAT(CONCAT('%', #{jobDesc}), '%')
+
+
+ AND t.executor_handler like CONCAT(CONCAT('%', #{executorHandler}), '%')
+
+
+ AND t.author like CONCAT(CONCAT('%', #{author}), '%')
+
+
+
-
- INSERT INTO xxl_job_info (
- job_group,
- job_desc,
- add_time,
- update_time,
- author,
- alarm_email,
- schedule_type,
- schedule_conf,
- misfire_strategy,
- executor_route_strategy,
- executor_handler,
- executor_param,
- executor_block_strategy,
- executor_timeout,
- executor_fail_retry_count,
- glue_type,
- glue_source,
- glue_remark,
- glue_updatetime,
- child_jobid,
- trigger_status,
- trigger_last_time,
- trigger_next_time
- ) VALUES (
- #{jobGroup},
- #{jobDesc},
- #{addTime},
- #{updateTime},
- #{author},
- #{alarmEmail},
- #{scheduleType},
- #{scheduleConf},
- #{misfireStrategy},
- #{executorRouteStrategy},
- #{executorHandler},
- #{executorParam},
- #{executorBlockStrategy},
- #{executorTimeout},
- #{executorFailRetryCount},
- #{glueType},
- #{glueSource},
- #{glueRemark},
- #{glueUpdatetime},
- #{childJobId},
- #{triggerStatus},
- #{triggerLastTime},
- #{triggerNextTime}
- );
-
-
+
-
- SELECT
-
- FROM xxl_job_info AS t
- WHERE t.id = #{id}
-
+
+ SELECT
+
+ FROM xxl_job_info AS t
+ WHERE t.id = #{id}
+
-
- UPDATE xxl_job_info
- SET
- job_group = #{jobGroup},
- job_desc = #{jobDesc},
- update_time = #{updateTime},
- author = #{author},
- alarm_email = #{alarmEmail},
- schedule_type = #{scheduleType},
- schedule_conf = #{scheduleConf},
- misfire_strategy = #{misfireStrategy},
- executor_route_strategy = #{executorRouteStrategy},
- executor_handler = #{executorHandler},
- executor_param = #{executorParam},
- executor_block_strategy = #{executorBlockStrategy},
+
+ UPDATE xxl_job_info
+ SET
+ job_group = #{jobGroup},
+ job_desc = #{jobDesc},
+ update_time = #{updateTime},
+ author = #{author},
+ alarm_email = #{alarmEmail},
+ schedule_type = #{scheduleType},
+ schedule_conf = #{scheduleConf},
+ misfire_strategy = #{misfireStrategy},
+ executor_route_strategy = #{executorRouteStrategy},
+ executor_handler = #{executorHandler},
+ executor_param = #{executorParam},
+ executor_block_strategy = #{executorBlockStrategy},
executor_timeout = #{executorTimeout},
executor_fail_retry_count = #{executorFailRetryCount},
- glue_type = #{glueType},
- glue_source = #{glueSource},
- glue_remark = #{glueRemark},
- glue_updatetime = #{glueUpdatetime},
- child_jobid = #{childJobId},
- trigger_status = #{triggerStatus},
- trigger_last_time = #{triggerLastTime},
- trigger_next_time = #{triggerNextTime}
- WHERE id = #{id}
-
+ glue_type = #{glueType},
+ glue_source = #{glueSource},
+ glue_remark = #{glueRemark},
+ glue_updatetime = #{glueUpdatetime},
+ child_jobid = #{childJobId},
+ trigger_status = #{triggerStatus},
+ trigger_last_time = #{triggerLastTime},
+ trigger_next_time = #{triggerNextTime}
+ WHERE id = #{id}
+
-
- DELETE
- FROM xxl_job_info
- WHERE id = #{id}
-
+
+ DELETE
+ FROM xxl_job_info
+ WHERE id = #{id}
+
-
- SELECT
-
- FROM xxl_job_info AS t
- WHERE t.job_group = #{jobGroup}
-
+
+ SELECT
+
+ FROM xxl_job_info AS t
+ WHERE t.job_group = #{jobGroup}
+
-
- SELECT count(1)
- FROM xxl_job_info
-
+
+ SELECT count(1)
+ FROM xxl_job_info
+
-
- SELECT
-
- FROM xxl_job_info AS t
- WHERE t.trigger_status = 1
- and t.trigger_next_time #{maxNextTime}
- ORDER BY id ASC
- LIMIT #{pagesize}
-
+
+ SELECT
+
+ FROM xxl_job_info AS t
+ WHERE t.trigger_status = 1
+ and t.trigger_next_time #{maxNextTime}
+ ORDER BY id ASC
+ LIMIT #{pagesize}
+
-
- UPDATE xxl_job_info
- SET
- trigger_last_time = #{triggerLastTime},
+
+ UPDATE xxl_job_info
+ SET
+ trigger_last_time = #{triggerLastTime},
trigger_next_time = #{triggerNextTime}
, trigger_status = #{triggerStatus}
- WHERE id = #{id}
+ WHERE id = #{id}
AND trigger_status = 1
-
+
diff --git a/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml b/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
index 11dd95551..f40e0fed5 100644
--- a/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
+++ b/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobLogMapper.xml
@@ -3,17 +3,17 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -23,124 +23,124 @@
-
-
+
+
-
- t.id,
- t.job_group,
- t.job_id,
- t.executor_address,
- t.executor_handler,
- t.executor_param,
- t.executor_sharding_param,
- t.executor_fail_retry_count,
- t.trigger_time,
- t.trigger_code,
- t.trigger_msg,
- t.handle_time,
- t.handle_code,
- t.handle_msg,
- t.alarm_status
-
+
+ t.id,
+ t.job_group,
+ t.job_id,
+ t.executor_address,
+ t.executor_handler,
+ t.executor_param,
+ t.executor_sharding_param,
+ t.executor_fail_retry_count,
+ t.trigger_time,
+ t.trigger_code,
+ t.trigger_msg,
+ t.handle_time,
+ t.handle_code,
+ t.handle_msg,
+ t.alarm_status
+
- SELECT
-
- FROM xxl_job_log AS t
-
-
- AND t.job_group = #{jobGroup}
-
-
- AND t.job_id = #{jobId}
-
-
- AND t.trigger_time = ]]> #{triggerTimeStart}
-
-
- AND t.trigger_time #{triggerTimeEnd}
-
-
- AND t.handle_code = 200
-
-
- AND (
+ SELECT
+
+ FROM xxl_job_log AS t
+
+
+ AND t.job_group = #{jobGroup}
+
+
+ AND t.job_id = #{jobId}
+
+
+ AND t.trigger_time = ]]> #{triggerTimeStart}
+
+
+ AND t.trigger_time #{triggerTimeEnd}
+
+
+ AND t.handle_code = 200
+
+
+ AND (
t.trigger_code NOT IN (0, 200) OR
t.handle_code NOT IN (0, 200)
- )
-
-
- AND t.trigger_code = 200
- AND t.handle_code = 0
-
-
- ORDER BY t.trigger_time DESC
- LIMIT #{offset}, #{pagesize}
-
+ )
+
+
+ AND t.trigger_code = 200
+ AND t.handle_code = 0
+
+
+ ORDER BY t.trigger_time DESC
+ LIMIT #{offset}, #{pagesize}
+
- SELECT count(1)
- FROM xxl_job_log AS t
-
-
- AND t.job_group = #{jobGroup}
-
-
- AND t.job_id = #{jobId}
-
-
- AND t.trigger_time = ]]> #{triggerTimeStart}
-
-
- AND t.trigger_time #{triggerTimeEnd}
-
-
- AND t.handle_code = 200
-
-
- AND (
+ SELECT count(1)
+ FROM xxl_job_log AS t
+
+
+ AND t.job_group = #{jobGroup}
+
+
+ AND t.job_id = #{jobId}
+
+
+ AND t.trigger_time = ]]> #{triggerTimeStart}
+
+
+ AND t.trigger_time #{triggerTimeEnd}
+
+
+ AND t.handle_code = 200
+
+
+ AND (
t.trigger_code NOT IN (0, 200) OR
t.handle_code NOT IN (0, 200)
- )
-
-
- AND t.trigger_code = 200
- AND t.handle_code = 0
-
-
-
+ )
+
+
+ AND t.trigger_code = 200
+ AND t.handle_code = 0
+
+
+
- SELECT
-
- FROM xxl_job_log AS t
- WHERE t.id = #{id}
-
+ SELECT
+
+ FROM xxl_job_log AS t
+ WHERE t.id = #{id}
+
-
- INSERT INTO xxl_job_log (
+
+ INSERT INTO xxl_job_log (
`job_group`,
`job_id`,
`trigger_time`,
`trigger_code`,
`handle_code`
- ) VALUES (
+ ) VALUES (
#{jobGroup},
#{jobId},
#{triggerTime},
#{triggerCode},
#{handleCode}
- );
-
-
+
-
- UPDATE xxl_job_log
- SET
+
+ UPDATE xxl_job_log
+ SET
`trigger_time`= #{triggerTime},
`trigger_code`= #{triggerCode},
`trigger_msg`= #{triggerMsg},
@@ -150,21 +150,21 @@
`executor_sharding_param`= #{executorShardingParam},
`executor_fail_retry_count`= #{executorFailRetryCount}
WHERE `id`= #{id}
-
+
-
- UPDATE xxl_job_log
+
+ UPDATE xxl_job_log
SET
`handle_time`= #{handleTime},
`handle_code`= #{handleCode},
`handle_msg`= #{handleMsg}
WHERE `id`= #{id}
-
+
-
- delete from xxl_job_log
- WHERE job_id = #{jobId}
-
+
+ delete from xxl_job_log
+ WHERE job_id = #{jobId}
+
- SELECT
+ SELECT
COUNT(handle_code) `triggerDayCount`,
SUM(CASE WHEN (trigger_code in (0, 200) and handle_code = 0) then 1 else 0 end) as `triggerDayCountRunning`,
SUM(CASE WHEN handle_code = 200 then 1 else 0 end) as `triggerDayCountSuc`
- FROM xxl_job_log
- WHERE trigger_time BETWEEN #{from} and #{to}
+ FROM xxl_job_log
+ WHERE trigger_time BETWEEN #{from} and #{to}
-
- SELECT id FROM xxl_job_log
-
-
- AND job_group = #{jobGroup}
-
-
- AND job_id = #{jobId}
-
-
- AND trigger_time #{clearBeforeTime}
-
-
- AND id NOT in(
- SELECT id FROM(
- SELECT id FROM xxl_job_log AS t
-
-
- AND t.job_group = #{jobGroup}
-
-
- AND t.job_id = #{jobId}
-
-
- ORDER BY t.trigger_time desc
- LIMIT 0, #{clearBeforeNum}
- ) t1
- )
-
-
- order by id asc
- LIMIT #{pagesize}
-
+
+ SELECT id FROM xxl_job_log
+
+
+ AND job_group = #{jobGroup}
+
+
+ AND job_id = #{jobId}
+
+
+ AND trigger_time #{clearBeforeTime}
+
+
+ AND id NOT in(
+ SELECT id FROM(
+ SELECT id FROM xxl_job_log AS t
+
+
+ AND t.job_group = #{jobGroup}
+
+
+ AND t.job_id = #{jobId}
+
+
+ ORDER BY t.trigger_time desc
+ LIMIT 0, #{clearBeforeNum}
+ ) t1
+ )
+
+
+ order by id asc
+ LIMIT #{pagesize}
+
-
- delete from xxl_job_log
- WHERE id in
-
- #{item}
-
-
+
+ delete from xxl_job_log
+ WHERE id in
+
+ #{item}
+
+
-
+
SELECT id FROM `xxl_job_log`
WHERE !(
(trigger_code in (0, 200) and handle_code = 0)
OR
(handle_code = 200)
- )
+ )
AND `alarm_status` = 0
- ORDER BY id ASC
- LIMIT #{pagesize}
-
+ ORDER BY id ASC
+ LIMIT #{pagesize}
+
-
- UPDATE xxl_job_log
- SET
+
+ UPDATE xxl_job_log
+ SET
`alarm_status` = #{newAlarmStatus}
WHERE `id`= #{logId} AND `alarm_status` = #{oldAlarmStatus}
-
+
-
- SELECT
+
+ SELECT
t.id
- FROM
+ FROM
xxl_job_log t
LEFT JOIN xxl_job_registry t2 ON t.executor_address = t2.registry_value
- WHERE
+ WHERE
t.trigger_code = 200
AND t.handle_code = 0
AND t.trigger_time #{losedTime}
AND t2.id IS NULL;
-
+
-
+
-
+
UPDATE xxl_job_log_report
SET `running_count` = #{runningCount},
`suc_count` = #{sucCount},
@@ -45,20 +45,20 @@
WHERE `trigger_day` = #{triggerDay}
-
- SELECT
-
- FROM xxl_job_log_report AS t
- WHERE t.trigger_day between #{triggerDayFrom} and #{triggerDayTo}
- ORDER BY t.trigger_day ASC
-
+
+ SELECT
+
+ FROM xxl_job_log_report AS t
+ WHERE t.trigger_day between #{triggerDayFrom} and #{triggerDayTo}
+ ORDER BY t.trigger_day ASC
+
-
- SELECT
+
+ SELECT
SUM(running_count) running_count,
SUM(suc_count) suc_count,
SUM(fail_count) fail_count
- FROM xxl_job_log_report AS t
-
+ FROM xxl_job_log_report AS t
+
\ No newline at end of file
diff --git a/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobRegistryMapper.xml b/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobRegistryMapper.xml
index eba0a2487..53c4cbc24 100644
--- a/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobRegistryMapper.xml
+++ b/pigx-visual/pigx-xxl-job-admin/src/main/resources/mybatis-mapper/XxlJobRegistryMapper.xml
@@ -3,42 +3,42 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-
+
+
-
-
+
+
-
- t.id,
- t.registry_group,
- t.registry_key,
- t.registry_value,
- t.update_time
-
+
+ t.id,
+ t.registry_group,
+ t.registry_key,
+ t.registry_value,
+ t.update_time
+
-
- SELECT t.id
- FROM xxl_job_registry AS t
+
+ SELECT t.id
+ FROM xxl_job_registry AS t
WHERE t.update_time DATE_ADD(#{nowTime},INTERVAL -#{timeout} SECOND)
-
+
-
- DELETE FROM xxl_job_registry
- WHERE id in
-
- #{item}
-
-
+
+ DELETE FROM xxl_job_registry
+ WHERE id in
+
+ #{item}
+
+
-
- SELECT
-
- FROM xxl_job_registry AS t
+
+ SELECT
+
+ FROM xxl_job_registry AS t
WHERE t.update_time ]]> DATE_ADD(#{nowTime},INTERVAL -#{timeout} SECOND)
-
+
INSERT INTO xxl_job_registry( `registry_group` , `registry_key` , `registry_value`, `update_time`)
@@ -62,11 +62,11 @@
-->
-
- DELETE FROM xxl_job_registry
- WHERE registry_group = #{registryGroup}
+
+ DELETE FROM xxl_job_registry
+ WHERE registry_group = #{registryGroup}
AND registry_key = #{registryKey}
AND registry_value = #{registryValue}
-
+
\ No newline at end of file