fuliqi
2024-11-15 2150b0b87de4ec80a9d3f968c6de947f361ca19f
ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -689,12 +689,20 @@
    <update id="updateOnline">
        <foreach collection="onlineList" item="online" separator=";">
            UPDATE
                t_yw_point
            t_yw_point
            SET
                online = #{online.online},
                update_time = #{online.updateTime}
            online = #{online.online},
            update_time = #{online.updateTime}
            WHERE
                EXISTS (SELECT 1 FROM t_monitor WHERE ip = #{online.ip} AND t_monitor.serial_number = t_yw_point.serial_number )
            EXISTS (SELECT 1 FROM t_monitor
            <where>
                ip = #{online.ip} AND t_monitor.serial_number = t_yw_point.serial_number
                <if test="online.online!=null and online.online">
                    and t_monitor.camera_fun_type = '2' or t_monitor.camera_fun_type = '3'
                </if>
            </where>
            )
        </foreach>
    </update>
</mapper>