| | |
| | | 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 |
| | | <if test="online.online!=null and online.online"> |
| | | and t_monitor.camera_fun_type = '2' or t_monitor.camera_fun_type = '3' |
| | | </if> |
| | | </where> |
| | | ) |
| | | WHERE ip = #{online.ip} |
| | | AND t_monitor.serial_number = t_yw_point.serial_number ) |
| | | </foreach> |
| | | </update> |
| | | |
| | | <update id="batchUpdateOnline"> |
| | | UPDATE |
| | | t_yw_point p |
| | | LEFT JOIN t_monitor m on p.serial_number = m.serial_number |
| | | SET |
| | | p.online = #{online}, |
| | | p.update_time = #{date} |
| | | WHERE m.ip in |
| | | <foreach collection="ipList" open="(" close=")" separator="," item="ip"> |
| | | #{ip} |
| | | </foreach> |
| | | </update> |
| | | <select id="selectCarOrFace" resultType="com.ycl.platform.domain.entity.TMonitor"> |
| | | select m.* |
| | | from t_monitor m |
| | | left join t_yw_point p |
| | | on m.serial_number = p.serial_number |
| | | where (m.camera_fun_type = '2' or m.camera_fun_type = '3') and p.examine_status = 1 |
| | | </select> |
| | | </mapper> |