|
@@ -20,15 +20,21 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
- <if test="param.userId !=null and param.cooperationNumList !=null and param.cooperationNumList.size >0">
|
|
|
- and ( p.user_id = #{param.userId} or p.num in
|
|
|
+ <if test="param.cameraId != null and param.userId !=null and param.cooperationNumList !=null and param.cooperationNumList.size >0">
|
|
|
+ and ( p.camera_id = #{param.cameraId} or p.user_id = #{param.userId} or p.num in
|
|
|
<foreach collection="param.cooperationNumList" item="coNum" open="(" separator="," close=")">
|
|
|
#{coNum}
|
|
|
</foreach>
|
|
|
)
|
|
|
</if>
|
|
|
- <if test="param.userId !=null and param.cooperationNumList !=null and param.cooperationNumList.size ==0 ">
|
|
|
- and p.user_id = #{param.userId}
|
|
|
+ <if test="param.cameraId != null and param.userId !=null and param.cooperationNumList !=null and param.cooperationNumList.size ==0 ">
|
|
|
+ and ( p.camera_id = #{param.cameraId} or p.user_id = #{param.userId} )
|
|
|
+ </if>
|
|
|
+ <if test="param.cameraId != null and param.userId ==null and param.cooperationNumList !=null and param.cooperationNumList.size ==0 ">
|
|
|
+ and p.camera_id = #{param.cameraId}
|
|
|
+ </if>
|
|
|
+ <if test="param.cameraId == null and param.userId !=null and param.cooperationNumList !=null and param.cooperationNumList.size ==0 ">
|
|
|
+ and p.user_id = #{param.userId}
|
|
|
</if>
|
|
|
</sql>
|
|
|
|