lyhzzz hace 3 años
padre
commit
d380cd546e

+ 1 - 0
src/main/java/com/fdkankan/manage/vo/request/SceneParam.java

@@ -10,4 +10,5 @@ public class SceneParam extends RequestBase {
     private String snCode;      //sn码
     private String userName;    //绑定账号
     private Integer type = 0;   //0 看看,1看见,2深时
+    private Integer companyId;
 }

+ 5 - 0
src/main/resources/mapper/manage/SceneProMapper.xml

@@ -38,6 +38,8 @@
     <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.sceneName != null and param.sceneName!='' ">
             and s.scene_name like concat ('%',#{param.sceneName},'%')
@@ -54,5 +56,8 @@
         <if test="param.type !=null and param.type == 1">
             and s.scene_source = 3
         </if>
+        <if test="param.companyId !=null ">
+            and co.id = #{param.companyId}
+        </if>
     </sql>
 </mapper>