Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dd774514
authored
Mar 30, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车辆监控搜索条件空判断
1 parent
880627c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
src/main/resources/mapper/VehicleMapper.xml
src/main/resources/mapper/VehicleMapper.xml
View file @
dd77451
...
@@ -126,6 +126,7 @@
...
@@ -126,6 +126,7 @@
left join t_device td on tvd.sn = td.sn
left join t_device td on tvd.sn = td.sn
where tv.del_flag = 0 and tvd.del_flag = 0
where tv.del_flag = 0 and tvd.del_flag = 0
and tvd.bind_status = 1
and tvd.bind_status = 1
<if
test=
"term != null and term != ''"
>
<choose>
<choose>
<when
test=
"termType == 1"
>
<when
test=
"termType == 1"
>
and tvd.sn like concat('%',#{term},'%')
and tvd.sn like concat('%',#{term},'%')
...
@@ -134,6 +135,7 @@
...
@@ -134,6 +135,7 @@
and tv.vin like concat('%',#{term},'%')
and tv.vin like concat('%',#{term},'%')
</when>
</when>
</choose>
</choose>
</if>
<if
test=
"shopId != null"
>
<if
test=
"shopId != null"
>
and tv.created_by = #{shopId}
and tv.created_by = #{shopId}
</if>
</if>
...
@@ -275,6 +277,7 @@
...
@@ -275,6 +277,7 @@
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
<if
test=
"term != null and term != ''"
>
<choose>
<choose>
<when
test=
"termType == 1"
>
<when
test=
"termType == 1"
>
and tvd.sn like concat('%',#{term},'%')
and tvd.sn like concat('%',#{term},'%')
...
@@ -286,6 +289,7 @@
...
@@ -286,6 +289,7 @@
and tv.owner_name like concat('%',#{term},'%')
and tv.owner_name like concat('%',#{term},'%')
</when>
</when>
</choose>
</choose>
</if>
group by tv.id
group by tv.id
order by tv.id desc
order by tv.id desc
</select>
</select>
...
@@ -311,6 +315,7 @@
...
@@ -311,6 +315,7 @@
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
<if
test=
"term != null and term != ''"
>
<choose>
<choose>
<when
test=
"termType == 1"
>
<when
test=
"termType == 1"
>
and tvd.sn like concat('%',#{term},'%')
and tvd.sn like concat('%',#{term},'%')
...
@@ -322,6 +327,7 @@
...
@@ -322,6 +327,7 @@
and tv.owner_name like concat('%',#{term},'%')
and tv.owner_name like concat('%',#{term},'%')
</when>
</when>
</choose>
</choose>
</if>
order by tv.id desc
order by tv.id desc
<if
test=
"threshold != null and threshold gt 0"
>
<if
test=
"threshold != null and threshold gt 0"
>
limit #{threshold}
limit #{threshold}
...
@@ -347,6 +353,7 @@
...
@@ -347,6 +353,7 @@
<foreach
collection=
"userIds"
separator=
","
open=
"("
close=
")"
item=
"item"
>
<foreach
collection=
"userIds"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
#{item}
</foreach>
</foreach>
<if
test=
"term != null and term != ''"
>
<choose>
<choose>
<when
test=
"termType == 1"
>
<when
test=
"termType == 1"
>
and tvd.sn like concat('%',#{term},'%')
and tvd.sn like concat('%',#{term},'%')
...
@@ -358,6 +365,7 @@
...
@@ -358,6 +365,7 @@
and tv.owner_name like concat('%',#{term},'%')
and tv.owner_name like concat('%',#{term},'%')
</when>
</when>
</choose>
</choose>
</if>
order by tv.id desc
order by tv.id desc
<if
test=
"threshold != null and threshold gt 0"
>
<if
test=
"threshold != null and threshold gt 0"
>
limit #{threshold}
limit #{threshold}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment