lyhzzz 2 gadi atpakaļ
vecāks
revīzija
7bd6c1f3be

+ 1 - 4
src/main/java/com/fdkankan/manage_jp/service/impl/SceneProServiceImpl.java

@@ -125,6 +125,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         if(!roleIds.contains(5L)){      //平台管理员
             param.setCompanyId(user.getCompanyId());
             param.setUserId(user.getId());
+            param.setNeStatus(-2);
             if(!roleIds.contains(6L)){
                 param.setIsDel(false);
                 param.setIsMain(false);
@@ -156,10 +157,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
                 }
             }
 
-            Company company = companyService.getByCameraId(record.getCameraId());
-            if(company != null){
-                record.setCompanyName(company.getCompanyName());
-            }
             if(StringUtils.isNotBlank(record.getSceneVersion()) && record.getSceneVersion().equals("v3")){
                 record.setIsUpgrade(0);
             }

+ 6 - 3
src/main/resources/mapper/manage_jp/SceneProMapper.xml

@@ -7,7 +7,7 @@
         SELECT * FROM(
         select s.scene_name ,s.num,s.create_time,c.sn_code,s.space as sceneSize
         ,u.user_name,s.view_count,s.status,s.pay_status,'v3' as scene_version ,s.web_site as webSite,thumb
-        ,null as algorithmTime,c.child_name,s.camera_id,s.laser_title
+        ,null as algorithmTime,c.child_name,s.camera_id,s.laser_title,co.company_name
         from t_scene_pro s
         <include refid="commonWhere"></include>
         <if test="param.sceneName != null and param.sceneName!='' ">
@@ -17,7 +17,7 @@
         UNION
         select s.title as sceneName ,s.num,s.create_time,c.sn_code,e.space as sceneSize
         ,u.user_name,e.view_count,s.scene_status as status,s.pay_status,'v4' as scene_version,e.web_site as webSite,thumb
-        ,algorithm_time,c.child_name,s.camera_id,s.laser_title
+        ,algorithm_time,c.child_name,s.camera_id,s.laser_title,co.company_name
         from t_scene_plus s
         left join t_scene_plus_ext e on s.id = e.plus_id
         <include refid="commonWhere"></include>
@@ -33,11 +33,14 @@
         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
+        left join t_company co on u.company_id = co.id
         where s.rec_status = 'A'
         <if test="param.childName != null and param.childName !='' ">
             and c.child_name like concat ('%',#{param.childName},'%')
         </if>
+        <if test="param.neStatus != null  ">
+            and s.pay_status !=#{param.neStatus}
+        </if>
         <if test="param.type !=null and param.type == 0">
             and s.scene_source in (1,2,12,13,14)
         </if>