Skip to content

Commit

Permalink
update quartz table name case
Browse files Browse the repository at this point in the history
  • Loading branch information
githubname1024 committed Feb 10, 2023
1 parent 06f369b commit a3ad745
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cachecloud-web/src/main/resources/mapper/QuartzDao.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@
<!--查询job分组下的所有trigger-->
<select id="getTriggersByJobGroup" resultType="TriggerInfo" parameterType="String">
SELECT <include refid="quartz_triggers_columns"/>
FROM qrtz_triggers t
FROM QRTZ_TRIGGERS t
WHERE JOB_GROUP = #{jobGroup};
</select>

<!--返回所有trigger-->
<select id="getAllTriggers" resultType="TriggerInfo">
SELECT <include refid="quartz_triggers_columns"/>, ifnull(ct.CRON_EXPRESSION,'') cron
FROM qrtz_triggers t
LEFT JOIN qrtz_cron_triggers ct
FROM QRTZ_TRIGGERS t
LEFT JOIN QRTZ_CRON_TRIGGERS ct
on (t.SCHED_NAME = ct.SCHED_NAME and t.TRIGGER_NAME = ct.TRIGGER_NAME and t.TRIGGER_GROUP=ct.TRIGGER_GROUP)
</select>

<!--查询trigger:模糊匹配trigger name或trigger group-->
<select id="searchTriggerByNameOrGroup" resultType="TriggerInfo" parameterType="String">
SELECT <include refid="quartz_triggers_columns"/>, ifnull(ct.CRON_EXPRESSION,'') cron
FROM qrtz_triggers t
LEFT JOIN qrtz_cron_triggers ct
FROM QRTZ_TRIGGERS t
LEFT JOIN QRTZ_CRON_TRIGGERS ct
on (t.SCHED_NAME = ct.SCHED_NAME and t.TRIGGER_NAME = ct.TRIGGER_NAME and t.TRIGGER_GROUP=ct.TRIGGER_GROUP)
WHERE t.TRIGGER_NAME REGEXP #{queryString}
OR t.TRIGGER_GROUP REGEXP #{queryString};
</select>

<select id="getTriggerStateCount" resultType="int">
select count(*) from qrtz_triggers where TRIGGER_STATE = #{triggerState}
select count(*) from QRTZ_TRIGGERS where TRIGGER_STATE = #{triggerState}
</select>

<select id="getMisFireTriggerCount" resultType="int">
select count(*) from qrtz_triggers where NEXT_FIRE_TIME &lt; unix_timestamp(now())*1000
select count(*) from QRTZ_TRIGGERS where NEXT_FIRE_TIME &lt; unix_timestamp(now())*1000
</select>

</mapper>

0 comments on commit a3ad745

Please sign in to comment.