|
|
@ -186,8 +186,8 @@
|
|
|
|
ORDER BY triggerDay
|
|
|
|
ORDER BY triggerDay
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="clearLog" >
|
|
|
|
<select id="findClearLogIds" resultType="long" >
|
|
|
|
delete from xxl_job_log
|
|
|
|
SELECT id FROM xxl_job_log
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
|
|
|
<if test="jobGroup gt 0">
|
|
|
|
<if test="jobGroup gt 0">
|
|
|
|
AND job_group = #{jobGroup}
|
|
|
|
AND job_group = #{jobGroup}
|
|
|
@ -200,22 +200,32 @@
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="clearBeforeNum gt 0">
|
|
|
|
<if test="clearBeforeNum gt 0">
|
|
|
|
AND id NOT in(
|
|
|
|
AND id NOT in(
|
|
|
|
SELECT id FROM(
|
|
|
|
SELECT id FROM(
|
|
|
|
SELECT id FROM xxl_job_log AS t
|
|
|
|
SELECT id FROM xxl_job_log AS t
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND | OR" >
|
|
|
|
<if test="jobGroup gt 0">
|
|
|
|
<if test="jobGroup gt 0">
|
|
|
|
AND t.job_group = #{jobGroup}
|
|
|
|
AND t.job_group = #{jobGroup}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="jobId gt 0">
|
|
|
|
<if test="jobId gt 0">
|
|
|
|
AND t.job_id = #{jobId}
|
|
|
|
AND t.job_id = #{jobId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
ORDER BY t.trigger_time desc
|
|
|
|
ORDER BY t.trigger_time desc
|
|
|
|
LIMIT 0, #{clearBeforeNum}
|
|
|
|
LIMIT 0, #{clearBeforeNum}
|
|
|
|
) t1
|
|
|
|
) t1
|
|
|
|
)
|
|
|
|
)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
order by id asc
|
|
|
|
|
|
|
|
LIMIT #{pagesize}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="clearLog" >
|
|
|
|
|
|
|
|
delete from xxl_job_log
|
|
|
|
|
|
|
|
WHERE id in
|
|
|
|
|
|
|
|
<foreach collection="logIds" item="item" open="(" close=")" separator="," >
|
|
|
|
|
|
|
|
#{item}
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="findFailJobLogIds" resultType="long" >
|
|
|
|
<select id="findFailJobLogIds" resultType="long" >
|
|
|
|