|
@@ -173,4 +173,29 @@ public class SceneDownloadLogServiceImpl extends ServiceImpl<ISceneDownloadLogMa
|
|
|
redisUtil.del(String.format(RedisKey.PREFIX_DOWNLOAD_PROGRESS_V4,num));
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResultData downOfflineSceneCheck(String num) {
|
|
|
+
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
+ if(Objects.isNull(scenePlus)){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
+ }
|
|
|
+ Scene scene = sceneService.getBySceneCode(num);
|
|
|
+ String mapping = scene.getMapping();
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ SceneDownloadLog sceneDownloadLog = this.getOne(
|
|
|
+ new LambdaQueryWrapper<SceneDownloadLog>()
|
|
|
+ .eq(SceneDownloadLog::getSceneNum, num)
|
|
|
+ .orderByDesc(SceneDownloadLog::getId)
|
|
|
+ .last("limit 1"));
|
|
|
+ if(Objects.nonNull(sceneDownloadLog) && sceneDownloadLog.getStatus() == 1){
|
|
|
+ String url=this.publicUrl+":"+fdkkLaserConfig.getLaserPort()+"/" + mapping +sceneDownloadLog.getDownloadUrl();
|
|
|
+ result.put("status", 2);
|
|
|
+ result.put("url",url);
|
|
|
+ }else{
|
|
|
+ result.put("status", 1);
|
|
|
+ }
|
|
|
+ return ResultData.ok(result);
|
|
|
+ }
|
|
|
}
|