预警分析sql修复

This commit is contained in:
hongchao 2026-01-27 16:33:04 +08:00
parent 193a70ab7b
commit d33c3610c3
1 changed files with 3 additions and 3 deletions

View File

@ -261,13 +261,13 @@
AND mm.next_check_time < NOW() AND mm.next_check_time < NOW()
</if> </if>
<if test="status != null and status == 2"> <if test="status != null and status == 2">
AND mm.next_check_time &lt; NOW() AND DATEDIFF(NOW(), mm.next_check_time) &lt;= 7 AND mm.next_check_time > NOW() AND DATEDIFF(mm.next_check_time, NOW()) &lt;= 7
</if> </if>
<if test="status != null and status == 3"> <if test="status != null and status == 3">
AND mm.next_check_time &lt; NOW() AND DATEDIFF(NOW(), mm.next_check_time) &lt;=15 AND mm.next_check_time > NOW() AND DATEDIFF(mm.next_check_time, NOW()) &lt;=15
</if> </if>
<if test="status != null and status == 4"> <if test="status != null and status == 4">
AND mm.next_check_time &lt; NOW() AND DATEDIFF(NOW(), mm.next_check_time) &lt;= 30 AND mm.next_check_time > NOW() AND DATEDIFF(mm.next_check_time, NOW()) &lt;= 30
</if> </if>
<if test="keyWord != null and keyWord != ''"> <if test="keyWord != null and keyWord != ''">
and ( and (