t.id,
t.job_group,
t.job_id,
t.executor_address,
t.executor_handler,
t.executor_param,
t.executor_fail_retry_count,
t.trigger_time,
t.trigger_code,
t.trigger_msg,
t.handle_time,
t.handle_code,
t.handle_msg
INSERT INTO XXL_JOB_QRTZ_TRIGGER_LOG (
`job_group`,
`job_id`,
`trigger_code`,
`handle_code`
) VALUES (
#{jobGroup},
#{jobId},
#{triggerCode},
#{handleCode}
);
UPDATE XXL_JOB_QRTZ_TRIGGER_LOG
SET
`trigger_time`= #{triggerTime},
`trigger_code`= #{triggerCode},
`trigger_msg`= #{triggerMsg},
`executor_address`= #{executorAddress},
`executor_handler`=#{executorHandler},
`executor_param`= #{executorParam},
`executor_fail_retry_count`= #{executorFailRetryCount}
WHERE `id`= #{id}
UPDATE XXL_JOB_QRTZ_TRIGGER_LOG
SET
`handle_time`= #{handleTime},
`handle_code`= #{handleCode},
`handle_msg`= #{handleMsg}
WHERE `id`= #{id}
delete from XXL_JOB_QRTZ_TRIGGER_LOG
WHERE job_id = #{jobId}
delete from XXL_JOB_QRTZ_TRIGGER_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_QRTZ_TRIGGER_LOG AS t
AND t.job_group = #{jobGroup}
AND t.job_id = #{jobId}
ORDER BY t.trigger_time desc
LIMIT 0, #{clearBeforeNum}
) t1
)