lyhzzz 1 年之前
父节点
当前提交
be30cf62c1
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/main/resources/mapper/ucenter/ScenePlusMapper.xml

+ 8 - 0
src/main/resources/mapper/ucenter/ScenePlusMapper.xml

@@ -33,6 +33,13 @@
         <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.camera_id = #{param.cameraId}  or p.num in
+            <foreach collection="param.cooperationNumList" item="coNum" open="(" separator="," close=")">
+                #{coNum}
+            </foreach>
+            )
+        </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>
@@ -44,6 +51,7 @@
             )
         </if>
 
+
     </sql>