|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.fusion.service.impl;
|
|
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -77,12 +78,17 @@ public class SceneService implements ISceneService {
|
|
|
if(param.getType() == null){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
- List<TmCamera> tmCameraList = tmCameraService.getByDeptIds();
|
|
|
- List<String> snCodes = tmCameraList.stream().map(TmCamera::getCameraSn).collect(Collectors.toList());
|
|
|
- if(CollectionUtil.isEmpty(snCodes)){
|
|
|
- snCodes = Arrays.asList("no_snCode");
|
|
|
+ List<TmCamera> tmCameraList = null;
|
|
|
+ String tokenValue = StpUtil.getTokenValue();
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(tokenValue)){
|
|
|
+ tmCameraList = tmCameraService.getByDeptIds();
|
|
|
+ List<String> snCodes = tmCameraList.stream().map(TmCamera::getCameraSn).collect(Collectors.toList());
|
|
|
+ if(CollectionUtil.isEmpty(snCodes)){
|
|
|
+ snCodes = Arrays.asList("no_snCode");
|
|
|
+ }
|
|
|
+ param.setSnCodes(snCodes);
|
|
|
}
|
|
|
- param.setSnCodes(snCodes);
|
|
|
List<SceneVo> sceneVoList = new ArrayList<>();
|
|
|
long total = 0;
|
|
|
if(param.getType() == 0 || param.getType() == 1 || param.getType() == 4){ //看看,看见 ,深时obj
|
|
@@ -110,7 +116,7 @@ public class SceneService implements ISceneService {
|
|
|
laserSceneParam.setPageNum(param.getPageNum());
|
|
|
laserSceneParam.setPageSize(param.getPageSize());
|
|
|
laserSceneParam.setStatus(param.getStatus());
|
|
|
- laserSceneParam.setSnCodes(snCodes);
|
|
|
+ laserSceneParam.setSnCodes(param.getSnCodes());
|
|
|
if(StringUtils.isNotBlank(param.getSceneName())){
|
|
|
laserSceneParam.setTitle(param.getSceneName());
|
|
|
}
|