|
@@ -8,6 +8,7 @@
|
|
p.camera_id,p.user_id ,p.data_source,p.scene_type,build_type
|
|
p.camera_id,p.user_id ,p.data_source,p.scene_type,build_type
|
|
FROM t_scene_pro p
|
|
FROM t_scene_pro p
|
|
left join `t_camera_detail` tcd on p.camera_id = tcd.camera_id
|
|
left join `t_camera_detail` tcd on p.camera_id = tcd.camera_id
|
|
|
|
+ left join t_company com on tcd.company_id = com.id
|
|
WHERE is_upgrade = 0 and p.rec_status = 'A' AND ( p.status = 1 OR p.status = -2) AND p.scene_type != 99
|
|
WHERE is_upgrade = 0 and p.rec_status = 'A' AND ( p.status = 1 OR p.status = -2) AND p.scene_type != 99
|
|
<include refid="commonWhere"></include>
|
|
<include refid="commonWhere"></include>
|
|
<if test="param.sceneName !=null and param.sceneName !=''">
|
|
<if test="param.sceneName !=null and param.sceneName !=''">
|
|
@@ -20,6 +21,7 @@
|
|
FROM t_scene_plus p
|
|
FROM t_scene_plus p
|
|
LEFT JOIN t_scene_plus_ext e on p.id = e.plus_id
|
|
LEFT JOIN t_scene_plus_ext e on p.id = e.plus_id
|
|
left join `t_camera_detail` tcd on p.camera_id = tcd.camera_id
|
|
left join `t_camera_detail` tcd on p.camera_id = tcd.camera_id
|
|
|
|
+ left join t_company com on tcd.company_id = com.id
|
|
WHERE p.rec_status = 'A' AND ( p.scene_status = 1 OR p.scene_status = -2) AND p.scene_type != 99
|
|
WHERE p.rec_status = 'A' AND ( p.scene_status = 1 OR p.scene_status = -2) AND p.scene_type != 99
|
|
<include refid="commonWhere"></include>
|
|
<include refid="commonWhere"></include>
|
|
<if test="param.sceneName !=null and param.sceneName !=''">
|
|
<if test="param.sceneName !=null and param.sceneName !=''">
|
|
@@ -60,6 +62,9 @@
|
|
<if test= 'param.cameraType != null' >
|
|
<if test= 'param.cameraType != null' >
|
|
and tcd.goods_id = #{param.cameraType}
|
|
and tcd.goods_id = #{param.cameraType}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test= 'param.companyId != null' >
|
|
|
|
+ and com.id = #{param.companyId}
|
|
|
|
+ </if>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
|