Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
2196ccc2
Commit
2196ccc2
authored
Oct 10, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上图设备id查询mapper修改 gengdidi
parent
a6f511f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
TMapDeviceInfoMapper.xml
...src/main/resources/mapper/system/TMapDeviceInfoMapper.xml
+26
-3
No files found.
danger-manage-system/src/main/resources/mapper/system/TMapDeviceInfoMapper.xml
View file @
2196ccc2
...
@@ -42,8 +42,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -42,8 +42,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
</select>
<select
id=
"selectTMapDeviceInfoById"
parameterType=
"Long"
resultMap=
"TMapDeviceInfoResult"
>
<select
id=
"selectTMapDeviceInfoById"
parameterType=
"Long"
resultMap=
"TMapDeviceInfoResult"
>
<include
refid=
"selectTMapDeviceInfoVo"
/>
SELECT
where map_device_id = #{mapDeviceId}
device.map_device_id,
device.map_device_name,
device.map_device_type,
device.map_device_num,
device.map_device_medium,
device.map_device_unit,
device.longitude,
device.latitude,
mon.monitor_device_status,
mon.monitor_value
FROM
t_map_device_info device
LEFT JOIN (
SELECT
max(monitor.monitor_id),
monitor.monitor_value,
monitor.monitor_device_status,
monitor.monitor_device_num
FROM
t_map_device_monitor monitor
GROUP BY
monitor.monitor_device_num
)mon ON device.map_device_num = mon.monitor_device_num
where device.map_device_id = #{mapDeviceId}
</select>
</select>
<insert
id=
"insertTMapDeviceInfo"
parameterType=
"TMapDeviceInfo"
useGeneratedKeys=
"true"
keyProperty=
"mapDeviceId"
>
<insert
id=
"insertTMapDeviceInfo"
parameterType=
"TMapDeviceInfo"
useGeneratedKeys=
"true"
keyProperty=
"mapDeviceId"
>
...
@@ -135,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -135,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t_map_device_monitor monitor
t_map_device_monitor monitor
GROUP BY
GROUP BY
monitor.monitor_device_num
monitor.monitor_device_num
)mon ON device.map_device_num = mon.monitor_device_num
;
)mon ON device.map_device_num = mon.monitor_device_num
<where>
<where>
<if
test=
"mapDeviceName != null and mapDeviceName != ''"
>
and device.map_device_name like concat('%', #{mapDeviceName}, '%')
</if>
<if
test=
"mapDeviceName != null and mapDeviceName != ''"
>
and device.map_device_name like concat('%', #{mapDeviceName}, '%')
</if>
<if
test=
"mapDeviceType != null and mapDeviceType != ''"
>
and device.map_device_type = #{mapDeviceType}
</if>
<if
test=
"mapDeviceType != null and mapDeviceType != ''"
>
and device.map_device_type = #{mapDeviceType}
</if>
...
...
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