|
@@ -11,6 +11,7 @@ import com.fdkankan.ucenter.common.DownloadStatusEnum;
|
|
|
import com.fdkankan.ucenter.common.constants.NacosProperty;
|
|
|
import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
|
import com.fdkankan.ucenter.common.constants.ResultCode;
|
|
|
+import com.fdkankan.ucenter.constant.CameraConstant;
|
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
|
import com.fdkankan.ucenter.entity.*;
|
|
|
import com.fdkankan.ucenter.httpClient.service.LaserService;
|
|
@@ -394,13 +395,25 @@ public class DownService implements IDownService {
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3015,LoginConstant.FAILURE_MSG_3015);
|
|
|
}
|
|
|
ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
- if(scenePlus == null || scenePlus.getSceneStatus() !=-2){
|
|
|
+ if(scenePlus == null ){
|
|
|
throw new BusinessException(ResultCode.FAILURE_CODE_400002,ResultCode.FAILURE_MSG_400002);
|
|
|
}
|
|
|
- if(scenePlus.getCameraId() == null){
|
|
|
+ if(scenePlus.getSceneStatus() != -2){
|
|
|
throw new BusinessException(ResultCode.FAILURE_CODE_400002,ResultCode.FAILURE_MSG_400002);
|
|
|
}
|
|
|
+ if(scenePlus.getSceneSource() != 4 && scenePlus.getSceneSource() != 5){
|
|
|
+ throw new BusinessException(ResultCode.FAILURE_CODE_400011,ResultCode.FAILURE_MSG_400011);
|
|
|
+ }
|
|
|
+ if(scenePlus.getUserId()!= null && scenePlus.getUserId().equals(user.getId())){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(scenePlus.getCameraId() == null){
|
|
|
+ throw new BusinessException(ResultCode.FAILURE_CODE_400010,ResultCode.FAILURE_MSG_400010);
|
|
|
+ }
|
|
|
CameraDetail cameraDetail = cameraDetailService.getByCameraId(scenePlus.getCameraId());
|
|
|
+ if(cameraDetail == null){
|
|
|
+ throw new BusinessException(CameraConstant.FAILURE_CODE_6029,CameraConstant.FAILURE_MSG_6029);
|
|
|
+ }
|
|
|
if(!cameraDetail.getUserId().equals(user.getId())){
|
|
|
throw new BusinessException(ResultCode.FAILURE_CODE_400012,ResultCode.FAILURE_MSG_400012);
|
|
|
}
|