|
@@ -29,9 +29,9 @@
|
|
|
|
|
|
<select id="pageList" resultType="com.fdkankan.manage.vo.response.SceneVo">
|
|
|
SELECT * FROM(
|
|
|
- select s.scene_name ,s.num,s.create_time,c.sn_code,s.space as sceneSize
|
|
|
- ,u.user_name,s.view_count,s.status,s.pay_status,'v3' as scene_version ,s.web_site , s.thumb
|
|
|
- ,null as algorithmTime,data_source,s.shoot_count,s.gps
|
|
|
+ select s.scene_name ,s.num,s.create_time,s.space as sceneSize
|
|
|
+ ,s.view_count,s.status,s.pay_status,'v3' as scene_version ,s.web_site , s.thumb
|
|
|
+ ,null as algorithmTime,data_source,s.shoot_count,s.gps,s.user_id,s.camera_id
|
|
|
from t_scene_pro s
|
|
|
<include refid="commonWhere"></include>
|
|
|
<if test="param.sceneName != null and param.sceneName!='' ">
|
|
@@ -39,9 +39,9 @@
|
|
|
</if>
|
|
|
and is_upgrade = 0
|
|
|
UNION ALL
|
|
|
- select s.title as sceneName ,s.num,s.create_time,c.sn_code,e.space as sceneSize
|
|
|
- ,u.user_name,e.view_count,s.scene_status as status,s.pay_status,'v4' as scene_version,e.web_site,e.thumb
|
|
|
- ,algorithm_time,data_source,e.shoot_count,e.gps
|
|
|
+ select s.title as sceneName ,s.num,s.create_time,e.space as sceneSize
|
|
|
+ ,e.view_count,s.scene_status as status,s.pay_status,'v4' as scene_version,e.web_site,e.thumb
|
|
|
+ ,algorithm_time,data_source,e.shoot_count,e.gps,s.user_id,s.camera_id
|
|
|
from t_scene_plus s
|
|
|
left join t_scene_plus_ext e on s.id = e.plus_id
|
|
|
<include refid="commonWhere"></include>
|
|
@@ -53,17 +53,21 @@
|
|
|
</select>
|
|
|
|
|
|
<sql id="commonWhere">
|
|
|
- left join t_user u on s.user_id = u.id
|
|
|
- left join t_camera c on s.camera_id = c.id
|
|
|
- left join t_camera_detail d on c.id = d.camera_id
|
|
|
- left join t_company co on d.company_id = co.id
|
|
|
where s.rec_status = 'A'
|
|
|
- <if test="param.snCode != null and param.snCode !='' ">
|
|
|
- and c.sn_code like concat ('%',#{param.snCode},'%')
|
|
|
+ <if test="param.cameraIds !=null and param.cameraIds.size >0">
|
|
|
+ and s.camera_id in
|
|
|
+ <foreach item="cameraId" collection="param.cameraIds" open="(" separator="," close=")">
|
|
|
+ #{cameraId}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
- <if test="param.userName != null and param.userName !='' ">
|
|
|
- and u.user_name like concat ('%',#{param.userName},'%')
|
|
|
+
|
|
|
+ <if test="param.userIds !=null and param.userIds.size >0">
|
|
|
+ and s.user_id in
|
|
|
+ <foreach item="userId" collection="param.userIds" open="(" separator="," close=")">
|
|
|
+ #{userId}
|
|
|
+ </foreach>
|
|
|
</if>
|
|
|
+
|
|
|
<if test="param.type !=null and param.type == 0">
|
|
|
and s.scene_source in (1,2,12,13,14)
|
|
|
</if>
|
|
@@ -76,9 +80,6 @@
|
|
|
<if test="param.type !=null and param.type == 7">
|
|
|
and s.scene_source = 5 and is_obj = 1
|
|
|
</if>
|
|
|
- <if test="param.companyId !=null ">
|
|
|
- and co.id = #{param.companyId}
|
|
|
- </if>
|
|
|
<if test="param.num !=null and param.num !='' ">
|
|
|
and s.num like concat ('%',#{param.num},'%')
|
|
|
</if>
|