Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
c14c914a
Commit
c14c914a
authored
May 25, 2022
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化video查询逻辑
parent
bd19f405
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
25 deletions
+32
-25
VideoMapper.xml
...ot-system-equip/src/main/resources/mapper/VideoMapper.xml
+32
-25
No files found.
amos-boot-system-equip/src/main/resources/mapper/VideoMapper.xml
View file @
c14c914a
...
@@ -53,8 +53,6 @@
...
@@ -53,8 +53,6 @@
group by wlv.id
group by wlv.id
order by wlv.create_date desc
order by wlv.create_date desc
</select>
</select>
<select
id=
"pageBuildingVideo"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO"
>
<!-- SELECT
<!-- SELECT
v.id AS id,
v.id AS id,
v.name AS name,
v.name AS name,
...
@@ -88,7 +86,7 @@
...
@@ -88,7 +86,7 @@
</if>
</if>
</where>
</where>
order by v.create_date-->
order by v.create_date-->
<select
id=
"pageBuildingVideo"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO"
>
SELECT
SELECT
v.id AS id,
v.id AS id,
v.name AS name,
v.name AS name,
...
@@ -98,28 +96,37 @@
...
@@ -98,28 +96,37 @@
v.address,
v.address,
v.preset_position as presetPosition
v.preset_position as presetPosition
FROM wl_video v
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
<choose>
join wl_form_instance wfl on wfl.instance_id = vc.source_id
<when
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
WHERE
JOIN wl_video_source vc ON vc.video_id = v.id
1 = 1
join wl_form_instance wfl on wfl.instance_id = vc.source_id
<if
test=
"dto.buildingId!=null and dto.buildingId!=''"
>
WHERE
and FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids)
FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids)
</if>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
<if
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
and v.name like concat('%',#{dto.equipmentName},'%')
and v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
</if>
</if>
<if
test=
"dto.code!=null and dto.code!=''"
>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
and v.code like concat('%',#{dto.code},'%')
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
</if>
GROUP BY id
<if
test=
"dto.code!=null and dto.code!=''"
>
order by v.create_date
and v.code like concat('%',#{dto.code},'%')
</when>
</if>
<when
test=
"dto.buildingId == null and dto.buildingId ==''"
>
<if
test=
"dto.orgCode!=null and dto.bizOrgCode!='' and dto.buildingId ==null and dto.buildingId =='' "
>
<where>
and wfl.field_value like concat (#{dto.bizOrgCode},'%')
<if
test=
"dto.bizOrgCode!=null and dto.bizOrgCode!=''"
>
</if>
v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
GROUP BY id
</if>
order by v.create_date
<if
test=
"dto.code!=null and dto.code!=''"
>
and v.code like concat('%',#{dto.code},'%')
</if>
<if
test=
"dto.equipmentName!=null and dto.equipmentName!=''"
>
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
</where>
GROUP BY id
order by v.create_date
</when>
</choose>
</select>
</select>
<select
id=
"getFireEquipByVideoId"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.BuildingListVO"
>
<select
id=
"getFireEquipByVideoId"
resultType=
"com.yeejoin.equipmanage.common.entity.vo.BuildingListVO"
>
...
...
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