Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TDLCloud
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
TDLCloud
Commits
ddb0bef2
Commit
ddb0bef2
authored
Jan 16, 2023
by
Carit Zhu
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询告警日志数据时增加endTime小于等于当前时间的条件
parent
ab9504a5
Pipeline
#1872
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
12 deletions
+32
-12
AlarmLogMapper.xml
src/main/resources/mapper/AlarmLogMapper.xml
+32
-12
No files found.
src/main/resources/mapper/AlarmLogMapper.xml
View file @
ddb0bef2
...
@@ -123,9 +123,14 @@
...
@@ -123,9 +123,14 @@
<if
test=
"startTime!=null"
>
<if
test=
"startTime!=null"
>
AND c.startTime
>
= #{startTime,jdbcType=INTEGER}
AND c.startTime
>
= #{startTime,jdbcType=INTEGER}
</if>
</if>
<if
test=
"endTime!=null"
>
<choose>
AND c.endTime
<
= #{endTime,jdbcType=INTEGER}
<when
test=
"endTime!=null"
>
</if>
AND c.endTime
<
= #{endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND c.endTime
<
= 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
>
= #{alarmTermVo.startTime,jdbcType=INTEGER}
AND c.startTime
>
= #{alarmTermVo.startTime,jdbcType=INTEGER}
</if>
</if>
<if
test=
"alarmTermVo.endTime!=null"
>
<choose>
AND c.endTime
<
= #{alarmTermVo.endTime,jdbcType=INTEGER}
<when
test=
"alarmTermVo.endTime!=null"
>
</if>
AND c.endTime
<
= #{alarmTermVo.endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND c.endTime
<
= 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
>
= #{startTime,jdbcType=INTEGER}
AND wal.alarmTime
>
= #{startTime,jdbcType=INTEGER}
</if>
</if>
<if
test=
"endTime!=null"
>
<choose>
AND wal.alarmTime
<
= #{endTime,jdbcType=INTEGER}
<when
test=
"endTime!=null"
>
</if>
AND wal.alarmTime
<
= #{endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND wal.alarmTime
<
= 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
>
= #{warehouseAlarmTermVo.startTime,jdbcType=INTEGER}
AND wal.alarmTime
>
= #{warehouseAlarmTermVo.startTime,jdbcType=INTEGER}
</if>
</if>
<if
test=
"warehouseAlarmTermVo.endTime!=null"
>
<choose>
AND wal.alarmTime
<
= #{warehouseAlarmTermVo.endTime,jdbcType=INTEGER}
<when
test=
"warehouseAlarmTermVo.endTime!=null"
>
</if>
AND wal.alarmTime
<
= #{warehouseAlarmTermVo.endTime,jdbcType=INTEGER}
</when>
<otherwise>
AND wal.alarmTime
<
= 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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment