12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?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.fdkankan.scene.mapper.IScenePlusMapper">
- <select id="selectCleanOrigScene" resultType="com.fdkankan.scene.bean.SceneBean">
- select plus.num, ext.data_source
- from t_scene_plus plus
- left join t_scene_plus_ext ext on plus.id = ext.plus_id
- where plus.scene_status in (1,-2) and ext.algorithm_time <![CDATA[ < ]]> #{time}
- and ext.data_source is NOT null
- and NOT EXISTS (select o.num from t_scene_clean_orig o where o.rec_status = 'A' and o.num = plus.num and ext.algorithm_time <![CDATA[ < ]]> o.create_time)
- </select>
- <select id="selectCleanOrigSceneDeleted" resultType="com.fdkankan.scene.bean.SceneBean">
- select plus.num, ext.data_source
- from t_scene_plus plus
- left join t_scene_plus_ext ext on plus.id = ext.plus_id
- where plus.rec_status = 'I' and plus.update_time <![CDATA[ < ]]> #{time}
- and ext.data_source is NOT null
- and NOT EXISTS (select o.num from t_scene_clean_orig o where o.rec_status = 'A' and o.num = plus.num and o.type = 2)
- </select>
- <select id="listCleanOss4TestCamera" resultType="com.fdkankan.scene.bean.SceneBean">
- select plus.num, ext.data_source
- from t_scene_plus plus
- left join t_scene_plus_ext ext on plus.id = ext.plus_id
- where plus.scene_status in (1,-2) and plus.rec_status = 'A' and ext.algorithm_time <![CDATA[ < ]]> #{time}
- and ext.data_source is NOT null
- and plus.camera_id in
- <foreach collection="cameraIds" item="cameraId" open="(" close=")" separator=",">
- #{cameraId}
- </foreach>
- and NOT EXISTS (select o.num from t_scene_clean_orig o where o.rec_status = 'A' and o.num = plus.num and o.type = 3 and ext.algorithm_time <![CDATA[ < ]]> o.create_time)
- </select>
- <select id="selectColdStorageScene" resultType="com.fdkankan.scene.bean.SceneBean">
- select plus.num, ext.data_source
- from t_scene_plus plus
- left join t_scene_plus_ext ext on plus.id = ext.plus_id
- where plus.scene_status in (1,-2) and ext.algorithm_time <![CDATA[ < ]]> #{time}
- and ext.data_source is NOT null
- and NOT EXISTS (select c.num from t_scene_cold_storage_log c where c.rec_status = 'A' and c.num = plus.num and ext.algorithm_time <![CDATA[ < ]]> c.create_time)
- and NOT EXISTS (select o.num from t_scene_clean_orig o where o.rec_status = 'A' and o.state != -1 and o.num = plus.num and ext.algorithm_time <![CDATA[ < ]]> o.create_time)
- </select>
- </mapper>
|