|
@@ -36,25 +36,36 @@
|
|
|
left join t_user u on s.user_id = u.id
|
|
|
left join t_camera c on s.camera_id = c.id
|
|
|
left join jy_user jy on u.id = jy.user_id
|
|
|
- where s.rec_status = 'A'
|
|
|
+ where
|
|
|
<include refid="commonWhere"></include>
|
|
|
|
|
|
- <if test="param.platformIds != null and param.platformIds.size >0">
|
|
|
- and jy.platform_id in
|
|
|
- <foreach item="platformId" collection="param.platformIds" open="(" separator="," close=")">
|
|
|
+ <if test="param.userId!=null">
|
|
|
+ and u.id = #{param.userId}
|
|
|
+ </if>
|
|
|
+ <if test="param.platformId!=null">
|
|
|
+ and jy.platform_id = #{param.platformId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="param.otherPlatformIds != null and param.otherPlatformIds.size >0">
|
|
|
+ or ( <include refid="commonWhere"></include>
|
|
|
+ and jy.platform_id in
|
|
|
+ <foreach item="platformId" collection="param.otherPlatformIds" open="(" separator="," close=")">
|
|
|
#{platformId}
|
|
|
</foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
|
|
|
- <if test="param.userIds !=null and param.userIds.size>0">
|
|
|
- and u.id in
|
|
|
- <foreach item="userId" collection="param.userIds" open="(" separator="," close=")">
|
|
|
+ <if test="param.otherUserIds !=null and param.otherUserIds.size>0">
|
|
|
+ or (<include refid="commonWhere"></include>
|
|
|
+ and u.id in
|
|
|
+ <foreach item="userId" collection="param.otherUserIds" open="(" separator="," close=")">
|
|
|
#{userId}
|
|
|
</foreach>
|
|
|
+ )
|
|
|
</if>
|
|
|
|
|
|
<if test="param.authNumList !=null and param.authNumList.size>0 ">
|
|
|
- or ( s.rec_status = 'A'
|
|
|
+ or (
|
|
|
<include refid="commonWhere"></include>
|
|
|
and s.num in
|
|
|
<foreach item="num" collection="param.authNumList" open="(" separator="," close=")">
|
|
@@ -68,7 +79,7 @@
|
|
|
</select>
|
|
|
|
|
|
<sql id="commonWhere">
|
|
|
-
|
|
|
+ s.rec_status = 'A'
|
|
|
<if test="param.sceneName != null and param.sceneName!='' ">
|
|
|
and s.title like concat ('%',#{param.sceneName},'%')
|
|
|
</if>
|