|
@@ -3,22 +3,22 @@
|
|
|
<mapper namespace="com.fdkankan.job.mapper.IScenePlusMapper">
|
|
|
|
|
|
<select id="selectColdStorageScene" resultType="com.fdkankan.job.dto.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 c where c.rec_status = 'A' AND c.`state` = 1 and c.num = plus.num)
|
|
|
- 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 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 c where c.rec_status = 'A' AND c.`state` = 1 and c.num = plus.num)
|
|
|
+-- 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>
|
|
|
|
|
|
<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 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>
|
|
|
|
|
|
|