|
@@ -66,8 +66,8 @@ public class DownService implements IDownService {
|
|
|
CameraType cameraType = cameraTypeService.getByCameraId(cameraId);
|
|
|
isObj = isObj == null ?0 :isObj;
|
|
|
|
|
|
- log.info("checkDownLoad--cameraType:{},isObj:{}",cameraType.getCameraType(),isObj);
|
|
|
- if(cameraType.getIsLaser() == 1 && isObj !=1){ //深时场景
|
|
|
+ log.info("checkDownLoad--cameraType:{},isObj:{}",cameraType,isObj);
|
|
|
+ if(cameraType != null && cameraType.getIsLaser() == 1 && isObj !=1){ //深时场景
|
|
|
return SSCheckDownload(sceneNum);
|
|
|
}
|
|
|
SceneDownloadLog sceneDownloadLog;
|
|
@@ -152,7 +152,7 @@ public class DownService implements IDownService {
|
|
|
}
|
|
|
Integer downLoadTotal = 0;
|
|
|
Integer downLoadNum = 0;
|
|
|
- if(!"aws".equals(NacosProperty.uploadType) && cameraType.getIsLaser() == 1){
|
|
|
+ if(!"aws".equals(NacosProperty.uploadType) && cameraType != null && cameraType.getIsLaser() == 1){
|
|
|
downLoadTotal = user.getSsDownloadNumTotal();
|
|
|
downLoadNum = user.getSsDownloadNum();
|
|
|
|
|
@@ -165,8 +165,8 @@ public class DownService implements IDownService {
|
|
|
return downVo;
|
|
|
}
|
|
|
|
|
|
- log.info("down--cameraType:{},isObj:{}",cameraType.getCameraType(),isObj);
|
|
|
- if(cameraType.getIsLaser() == 1 && isObj !=1){ //深时场景
|
|
|
+ log.info("down--cameraType:{},isObj:{}",cameraType,isObj);
|
|
|
+ if(cameraType != null && cameraType.getIsLaser() == 1 && isObj !=1){ //深时场景
|
|
|
return SSDownload(sceneNum,user);
|
|
|
}
|
|
|
|
|
@@ -192,7 +192,7 @@ public class DownService implements IDownService {
|
|
|
//修改用户的下载次数
|
|
|
LambdaUpdateWrapper<User> wrapper = new LambdaUpdateWrapper<>();
|
|
|
wrapper.eq(User::getId,user.getId());
|
|
|
- if(!"aws".equals(NacosProperty.uploadType) && cameraType.getIsLaser() == 1 ){ //深时场景
|
|
|
+ if(!"aws".equals(NacosProperty.uploadType) && cameraType != null && cameraType.getIsLaser() == 1 ){ //深时场景
|
|
|
wrapper.setSql("ss_download_num = ss_download_num + " + 1);
|
|
|
}else {
|
|
|
wrapper.setSql("download_num = download_num + " + 1);
|
|
@@ -225,8 +225,8 @@ public class DownService implements IDownService {
|
|
|
|
|
|
isObj = isObj == null ?0 :isObj;
|
|
|
|
|
|
- log.info("downloadProcess--cameraType:{},isObj:{}",cameraType.getCameraType(),isObj);
|
|
|
- if(cameraType.getIsLaser() == 1 && isObj !=1){ //深时场景
|
|
|
+ log.info("downloadProcess--cameraType:{},isObj:{}",cameraType,isObj);
|
|
|
+ if(cameraType != null && cameraType.getIsLaser() == 1 && isObj !=1){ //深时场景
|
|
|
return SSDownloadProcess(sceneNum);
|
|
|
}
|
|
|
String redisKey = RedisKey.PREFIX_DOWNLOAD_PROGRESS;
|
|
@@ -258,7 +258,7 @@ public class DownService implements IDownService {
|
|
|
sceneDownloadLog.setStatus(-1);
|
|
|
LambdaUpdateWrapper<User> wrapper = new LambdaUpdateWrapper<>();
|
|
|
wrapper.eq(User::getId,userId);
|
|
|
- if(!"aws".equals(NacosProperty.uploadType) && cameraType.getIsLaser() == 1 ){ //深时场景
|
|
|
+ if(!"aws".equals(NacosProperty.uploadType) && cameraType != null && cameraType.getIsLaser() == 1 ){ //深时场景
|
|
|
wrapper.setSql("ss_download_num = ss_download_num - " + 1);
|
|
|
}else {
|
|
|
wrapper.setSql("download_num = download_num - " + 1);
|