|
@@ -5,12 +5,11 @@
|
|
|
<select id="getSceneList" resultType="com.fdkankan.ucenter.vo.response.SceneVo">
|
|
|
SELECT * FROM (
|
|
|
SELECT p.id ,null as name ,0 as isFolder,null as type,null as parentId ,p.create_time,num,scene_name,scene_dec,
|
|
|
- p.status,pay_status,thumb,web_site,0 as is_upgrade,sn_code,view_count,p.build_type
|
|
|
+ p.status,pay_status,thumb,web_site,0 as is_upgrade,sn_code,view_count,p.build_type,p.scene_type
|
|
|
FROM t_scene_pro p
|
|
|
<include refid="sceneJoinCamera"></include>
|
|
|
- WHERE is_upgrade = 0 and p.rec_status = 'A'
|
|
|
+ WHERE is_upgrade = 0 and p.rec_status = 'A' and p.status in(1,-2)
|
|
|
<include refid="commonWhere"></include>
|
|
|
-
|
|
|
<if test="param.searchKey !=null and param.searchKey !=''">
|
|
|
and ( p.scene_name like CONCAT('%',#{param.searchKey},'%')
|
|
|
or c.sn_code like CONCAT('%',#{param.searchKey},'%')
|
|
@@ -24,11 +23,11 @@
|
|
|
</if>
|
|
|
UNION
|
|
|
SELECT p.id as id ,null as name ,0 as isFolder,null as type,null as parentId,p.create_time ,num,title as scene_name,description as scene_dec,
|
|
|
- scene_status as status,pay_status,thumb,web_site,1 as is_upgrade,sn_code,view_count,e.build_type
|
|
|
+ scene_status as status,pay_status,thumb,web_site,1 as is_upgrade,sn_code,view_count,e.build_type,p.scene_type
|
|
|
FROM t_scene_plus p
|
|
|
LEFT JOIN t_scene_plus_ext e on p.id = e.plus_id
|
|
|
<include refid="sceneJoinCamera"></include>
|
|
|
- WHERE p.rec_status = 'A'
|
|
|
+ WHERE p.rec_status = 'A' and p.scene_status in(1,-2)
|
|
|
<include refid="commonWhere"></include>
|
|
|
|
|
|
<if test="param.searchKey !=null and param.searchKey !=''">
|
|
@@ -47,9 +46,7 @@
|
|
|
</select>
|
|
|
|
|
|
<sql id="commonWhere">
|
|
|
- <if test="param.numList == null ">
|
|
|
- and p.user_id =#{param.userId}
|
|
|
- </if>
|
|
|
+ and p.user_id =#{param.userId} and pay_status = 1
|
|
|
</sql>
|
|
|
|
|
|
<sql id="sceneJoinCamera">
|