Commit ddb0bef2 authored by Carit Zhu's avatar Carit Zhu 🎱

查询告警日志数据时增加endTime小于等于当前时间的条件

parent ab9504a5
Pipeline #1872 passed with stage
in 0 seconds
...@@ -123,9 +123,14 @@ ...@@ -123,9 +123,14 @@
<if test="startTime!=null"> <if test="startTime!=null">
AND c.startTime &gt;= #{startTime,jdbcType=INTEGER} AND c.startTime &gt;= #{startTime,jdbcType=INTEGER}
</if> </if>
<if test="endTime!=null"> <choose>
AND c.endTime &lt;= #{endTime,jdbcType=INTEGER} <when test="endTime!=null">
</if> AND c.endTime &lt;= #{endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND c.endTime &lt;= REPLACE(unix_timestamp(current_timestamp(3)),'.','')
</otherwise>
</choose>
order by al.alarmTime DESC order by al.alarmTime DESC
</select> </select>
...@@ -150,9 +155,14 @@ ...@@ -150,9 +155,14 @@
<if test="alarmTermVo.startTime!=null"> <if test="alarmTermVo.startTime!=null">
AND c.startTime &gt;= #{alarmTermVo.startTime,jdbcType=INTEGER} AND c.startTime &gt;= #{alarmTermVo.startTime,jdbcType=INTEGER}
</if> </if>
<if test="alarmTermVo.endTime!=null"> <choose>
AND c.endTime &lt;= #{alarmTermVo.endTime,jdbcType=INTEGER} <when test="alarmTermVo.endTime!=null">
</if> AND c.endTime &lt;= #{alarmTermVo.endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND c.endTime &lt;= REPLACE(unix_timestamp(current_timestamp(3)),'.','')
</otherwise>
</choose>
order by al.alarmTime DESC order by al.alarmTime DESC
LIMIT #{initialValue,jdbcType=INTEGER},#{rows,jdbcType=INTEGER} LIMIT #{initialValue,jdbcType=INTEGER},#{rows,jdbcType=INTEGER}
</select> </select>
...@@ -175,9 +185,14 @@ ...@@ -175,9 +185,14 @@
<if test="startTime!=null"> <if test="startTime!=null">
AND wal.alarmTime &gt;= #{startTime,jdbcType=INTEGER} AND wal.alarmTime &gt;= #{startTime,jdbcType=INTEGER}
</if> </if>
<if test="endTime!=null"> <choose>
AND wal.alarmTime &lt;= #{endTime,jdbcType=INTEGER} <when test="endTime!=null">
</if> AND wal.alarmTime &lt;= #{endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND wal.alarmTime &lt;= REPLACE(unix_timestamp(current_timestamp(3)),'.','')
</otherwise>
</choose>
order by wal.alarmTime DESC order by wal.alarmTime DESC
</select> </select>
...@@ -199,9 +214,14 @@ ...@@ -199,9 +214,14 @@
<if test="warehouseAlarmTermVo.startTime!=null"> <if test="warehouseAlarmTermVo.startTime!=null">
AND wal.alarmTime &gt;= #{warehouseAlarmTermVo.startTime,jdbcType=INTEGER} AND wal.alarmTime &gt;= #{warehouseAlarmTermVo.startTime,jdbcType=INTEGER}
</if> </if>
<if test="warehouseAlarmTermVo.endTime!=null"> <choose>
AND wal.alarmTime &lt;= #{warehouseAlarmTermVo.endTime,jdbcType=INTEGER} <when test="warehouseAlarmTermVo.endTime!=null">
</if> AND wal.alarmTime &lt;= #{warehouseAlarmTermVo.endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND wal.alarmTime &lt;= REPLACE(unix_timestamp(current_timestamp(3)),'.','')
</otherwise>
</choose>
order by wal.alarmTime DESC order by wal.alarmTime DESC
LIMIT #{initialValue,jdbcType=INTEGER},#{rows,jdbcType=INTEGER} LIMIT #{initialValue,jdbcType=INTEGER},#{rows,jdbcType=INTEGER}
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment