lyhzzz 3 месяцев назад
Родитель
Сommit
9e7ea09486

+ 13 - 8
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -339,14 +339,16 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         Page<SceneVo> page ;
 
         if(param.getIsObj() != null){
-            if(param.getIsObj() == 0){
-                if(param.getSceneStatus() != null){
-                    param.setSceneStatus(param.getSceneStatus() == -2? 2: param.getSceneStatus());
-                }
-                page = this.getBaseMapper().selectLaser(new Page<>(param.getPageNum(),param.getPageSize()),param);
-            }else {
-                page = this.getBaseMapper().selectMesh(new Page<>(param.getPageNum(),param.getPageSize()),param);
-            }
+            page = this.getBaseMapper().selectMesh(new Page<>(param.getPageNum(),param.getPageSize()),param);
+
+//            if(param.getIsObj() == 0){
+//                if(param.getSceneStatus() != null){
+//                    param.setSceneStatus(param.getSceneStatus() == -2? 2: param.getSceneStatus());
+//                }
+//                page = this.getBaseMapper().selectLaser(new Page<>(param.getPageNum(),param.getPageSize()),param);
+//            }else {
+//                page = this.getBaseMapper().selectMesh(new Page<>(param.getPageNum(),param.getPageSize()),param);
+//            }
         }else {
             page = this.getBaseMapper().pageList2(new Page<>(param.getPageNum(),param.getPageSize()),param);
         }
@@ -366,6 +368,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
                 record.setWebSite(laserConfig.getLaserWebSite()+record.getNum());
                 record.setPayStatus(1);
             }
+            if( param.getIsObj() != null && param.getIsObj() == 0 ){
+                record.setWebSite(laserConfig.getLaserWebSite()+record.getNum());
+            }
 
             record.setStatusString(SceneStatusUtil.getStatusString(record));
             if(map !=null ){

+ 10 - 3
src/main/resources/mapper/manage/SceneProMapper.xml

@@ -64,9 +64,16 @@
                  left join t_camera c on s.camera_id = c.id
                  left join t_camera_detail d on s.camera_id = d.camera_id
                  left join jy_user jy on u.id = jy.user_id
-        WHERE s.rec_status = 'A' and
-            ( s.scene_source in (4,5) and e.is_obj = 1 or s.scene_source not in (4,5) )
-
+        WHERE s.rec_status = 'A'
+        <if test="param.isObj != null and param.isObj==0">
+            and  s.scene_source in (4,5)
+        </if>
+        <if test="param.isObj != null and param.isObj==1">
+            and ( s.scene_source in (4,5) and e.is_obj = 1 or s.scene_source not in (4,5) )
+        </if>
+        <if test="param.isObj == null ">
+            and ( s.scene_source in (4,5) and e.is_obj = 1 or s.scene_source not in (4,5) )
+        </if>
         <if test="param.sceneName != null and param.sceneName!='' ">
             and s.title like concat ('%',#{param.sceneName},'%')
         </if>