lyhzzz 3 weken geleden
bovenliggende
commit
927215c760

+ 8 - 4
src/main/java/com/fdkankan/ucenter/service/impl/AppSceneService.java

@@ -108,16 +108,20 @@ public class AppSceneService extends BaseController {
         //云端场景不展示复制场景
         Set<String> copyNumSet = sceneCopyLogService.getCopyNumSet();
         param.setCopyNumSet(copyNumSet);
-        
-        Page<AppSceneVo> page =  scenePlusMapper.pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
-        List<String> numList = page.getRecords().stream().map(AppSceneVo::getNum).collect(Collectors.toList());
-
 
         CameraTypelEnum cameraTypelEnum = CameraTypelEnum.getByCameraType(param.getCameraType());
         if(cameraTypelEnum == null){
             throw new BusinessException(CameraConstant.FAILURE_CODE_6028, CameraConstant.FAILURE_MSG_6028);
         }
 
+        param.setIsLaser(cameraTypelEnum.getLaser());
+
+        Page<AppSceneVo> page =  scenePlusMapper.pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
+        List<String> numList = page.getRecords().stream().map(AppSceneVo::getNum).collect(Collectors.toList());
+
+
+
+
         HashMap<String, JSONObject> ssSceneMap = new HashMap<>();
         if(cameraTypelEnum.getLaser() ){  //深时
             ssSceneMap = laserService.list(numList,cameraTypelEnum.getSceneSource().get(0));

+ 1 - 0
src/main/java/com/fdkankan/ucenter/vo/request/AppSceneParam.java

@@ -38,5 +38,6 @@ public class AppSceneParam extends RequestBase {
      * 是否是文保App
      */
     private Boolean queryVrPano = true;
+    private Boolean isLaser = false;
 
 }

+ 4 - 1
src/main/resources/mapper/ucenter/ScenePlusMapper.xml

@@ -77,9 +77,12 @@
             and  (e.location  != 7 or e.location is null )
         </if>
         AND ( p.scene_status = 1 OR p.scene_status = -2)
-        <if test="param.sceneName !=null and param.sceneName !=''">
+        <if test="param.sceneName !=null and param.sceneName !='' and param.isLaser == false">
             and  p.title like CONCAT('%',#{param.sceneName},'%')
         </if>
+        <if test="param.sceneName !=null and param.sceneName !='' and param.isLaser == true">
+            and  p.laser_title like CONCAT('%',#{param.sceneName},'%')
+        </if>
         <if test="param.orderBy !=null and param.orderBy !=''">
             ORDER BY  ${param.orderBy}
         </if>

+ 3 - 3
src/main/resources/mapper/ucenter/SceneProMapper.xml

@@ -30,7 +30,7 @@
         <include refid="sceneJoinCamera"></include>
         WHERE is_upgrade = 0 and  p.rec_status = 'A'
         <include refid="commonWhere"></include>
-
+        AND
         <include refid="commonSceneWhere"></include>
         <if test="param.sceneName !=null and param.sceneName !=''">
           and  p.scene_name like CONCAT('%',#{param.sceneName},'%')
@@ -46,7 +46,7 @@
         <include refid="sceneJoinCamera"></include>
         WHERE p.rec_status = 'A'
         <include refid="commonWhere"></include>
-
+        AND
         <include refid="commonSceneWhere"></include>
         <if test="param.sceneName !=null and param.sceneName !=''">
           and  p.title like CONCAT('%',#{param.sceneName},'%')
@@ -111,7 +111,7 @@
 
     <sql id="commonSceneWhere">
         <if test="param.sourceList !=null and param.sourceList.size >0">
-            and scene_source in
+            scene_source in
             <foreach item="sourceId" collection="param.sourceList" open="(" separator="," close=")">
                 #{sourceId}
             </foreach>