monitor-manage/src/main/resources/mapper/CameraChannelMapper.xml

43 lines
2.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hisense.monitormanage.mapper.CameraChannelMapper">
<!-- <update id="updateState" parameterType="java.util.List">-->
<!-- <foreach collection="list" item="item" index="index" open="begin" close=";end;" separator=";">-->
<!-- update CameraChannel set state =#{item.estAmount,jdbcType=NUMERIC}-->
<!-- where t.licai_id = #{item.licaiId,jdbcType=NUMERIC}-->
<!-- </foreach>-->
<!-- </update>-->
<select id="selectAll" resultType="com.hisense.monitormanage.dto.CameraChannelDto">
select c.* from t_camera_channel c
where (c.gps_x NOT IN('0.0','0','','-1000.0') OR c.gps_y NOT IN('0.0','0','','-1000.0'))
AND c.status != 0 AND c.check_status != 0
<!-- <bind name="page" value="(page-1)*pageSize"/>-->
<!-- limit #{page},#{pageSize}-->
</select>
<update id="updateCameraStatus" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" separator=";">
update t_camera_channel set check_status = 0
where channel_code = #{item,jdbcType=VARCHAR}
</foreach>
</update>
<select id="selectNLAll" resultType="com.hisense.monitormanage.dto.CameraChannelNLDto">
SELECT a.label_name,d.* from t_label a RIGHT JOIN (select b.label_code,c.* from t_camera_channel c
LEFT JOIN t_channel_mtm_label b on c.channel_code = b.channel_code) d
on d.label_code = a.label_code
<bind name="page" value="(page-1)*pageSize"/>
limit #{page},#{pageSize}
</select>
<select id="selectByLabel" resultType="com.hisense.monitormanage.dto.CameraChannelNLDto">
SELECT a.label_name,d.* from t_label a JOIN (select b.label_code,c.* from t_camera_channel c
JOIN t_channel_mtm_label b on c.channel_code = b.channel_code where b.label_code != '') d
on d.label_code = a.label_code
<bind name="page" value="(page-1)*pageSize"/>
limit #{page},#{pageSize}
</select>
</mapper>