|
@@ -117,6 +117,21 @@
|
|
<result property="cameraImg" column="camera_img"/>
|
|
<result property="cameraImg" column="camera_img"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
+ <!-- 设备树数据resultMap -->
|
|
|
|
+ <resultMap id="DeviceTreeResult" type="CentermonitorTCamera" extends="CentermonitorTCameraResult">
|
|
|
|
+ <collection property="channels" ofType="CentermonitorTCamerachannel" column="id" select="selectCameraChannels"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <!-- 根据摄像头ID查询关联的通道列表 -->
|
|
|
|
+ <select id="selectCameraChannels" parameterType="String" resultMap="com.sooka.sponest.monitor.camera.mapper.CentermonitorTCamerachannelMapper.CentermonitorTCamerachannelResult">
|
|
|
|
+ SELECT
|
|
|
|
+ id, create_by, create_time, update_by, update_time, data_status,
|
|
|
|
+ data_dept_id, camera_id, channel_code, channel_name, channel_type,
|
|
|
|
+ device_code, device_sn, device_protocol_type, device_login_type, channel_number
|
|
|
|
+ FROM centermonitor_t_camerachannel
|
|
|
|
+ WHERE camera_id = #{id} AND data_status = '0'
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<resultMap type="CameraCodeAndNameVO" id="getAllCameraList">
|
|
<resultMap type="CameraCodeAndNameVO" id="getAllCameraList">
|
|
<result property="cameraCode" column="camera_code"/>
|
|
<result property="cameraCode" column="camera_code"/>
|
|
<result property="cameraName" column="camera_name"/>
|
|
<result property="cameraName" column="camera_name"/>
|
|
@@ -1653,4 +1668,10 @@
|
|
</foreach>
|
|
</foreach>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <!-- 查询设备树数据 -->
|
|
|
|
+ <select id="selectDeviceTreeData" resultMap="DeviceTreeResult">
|
|
|
|
+ <include refid="selectCentermonitorTCameraVo"/>
|
|
|
|
+ ORDER BY create_time DESC
|
|
|
|
+ </select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|