|
@@ -12,6 +12,7 @@ import com.fdkankan.common.constant.SceneVersionType;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.image.MatrixToImageWriterUtil;
|
|
|
+import com.fdkankan.manage_jp.common.RedisKeyUtil;
|
|
|
import com.fdkankan.manage_jp.common.ResultCode;
|
|
|
import com.fdkankan.manage_jp.entity.*;
|
|
|
import com.fdkankan.manage_jp.exception.BusinessException;
|
|
@@ -19,6 +20,7 @@ import com.fdkankan.manage_jp.httpClient.service.LaserService;
|
|
|
import com.fdkankan.manage_jp.service.*;
|
|
|
import com.fdkankan.manage_jp.util.SceneResourcePath;
|
|
|
import com.fdkankan.manage_jp.util.SnowflakeIdGenerator;
|
|
|
+import com.fdkankan.redis.util.RedisUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -58,6 +60,8 @@ public class SceneCommonService {
|
|
|
ISceneProService sceneProService;
|
|
|
@Autowired
|
|
|
ISceneProEditService sceneProEditService;
|
|
|
+ @Autowired
|
|
|
+ RedisUtil redisUtil;
|
|
|
|
|
|
public String getNewNum(String oldNum ){
|
|
|
String newNum = scene3dNumService.generateNum();
|
|
@@ -222,8 +226,6 @@ public class SceneCommonService {
|
|
|
log.info("sceneCopy-V4-oldNum:{},oldDataSource:{},newNum:{},newDataSource:{}",
|
|
|
oldNum,oldDataSource,newNum,newDataSource);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
String newVideos = plusExt.getVideos();
|
|
|
if(StrUtil.isNotEmpty(newVideos)){
|
|
|
newVideos = plusExt.getVideos().replaceAll("/data/data" + oldNum, "/scene_view_data/" + newNum + "/data").replaceAll(oldNum, newNum);
|
|
@@ -294,6 +296,17 @@ public class SceneCommonService {
|
|
|
sceneEditInfo.getScenePassword(),scenePlus.getUserId(),"V4",
|
|
|
oldNum,plusExt.getAlgorithmTime(),scenePlus.getSceneSource(),plusExt.getShootCount(),plusExt.getLocation(),plusExt.getIsObj());
|
|
|
}
|
|
|
+ String redisKey = RedisKeyUtil.laserCopyLock + newNum;
|
|
|
+ long startTime = new Date().getTime();
|
|
|
+ long startTime2 = new Date().getTime();
|
|
|
+ while (redisUtil.hasKey(redisKey) ){ //深时场景复制同步锁
|
|
|
+ long waitTime = new Date().getTime();
|
|
|
+ if(waitTime - startTime2 >1000){
|
|
|
+ startTime2 = new Date().getTime();
|
|
|
+ log.info("等待激光复制业务结束----:{}",(waitTime - startTime) /1000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
scenePlus.setSceneStatus(-2);
|
|
|
scenePlusService.updateById(scenePlus);
|
|
|
}catch (Exception e){
|