|
@@ -82,6 +82,14 @@ public class SceneUpgradeToV4Service implements ISceneUpgradeToV4Service {
|
|
private String sceneProNewUrl;
|
|
private String sceneProNewUrl;
|
|
@Value("${fyun.host}")
|
|
@Value("${fyun.host}")
|
|
private String ossUrlPrefix;
|
|
private String ossUrlPrefix;
|
|
|
|
+ @Autowired
|
|
|
|
+ private RedisUtil redisUtil;
|
|
|
|
+ @Value("${fyun.bucket:4dkankan}")
|
|
|
|
+ private String bucket;
|
|
|
|
+ @Value("${upgrade.caches-images:yes}")
|
|
|
|
+ private String copyCachesImages;
|
|
|
|
+ @Value("${upgrade.houseType:yes}")
|
|
|
|
+ private String createHouseType;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private RedisLockUtil redisLockUtil;
|
|
private RedisLockUtil redisLockUtil;
|
|
@@ -95,18 +103,12 @@ public class SceneUpgradeToV4Service implements ISceneUpgradeToV4Service {
|
|
private ISceneEditControlsService sceneEditControlsService;
|
|
private ISceneEditControlsService sceneEditControlsService;
|
|
@Autowired
|
|
@Autowired
|
|
private ISceneRepairLogService sceneRepairLogService;
|
|
private ISceneRepairLogService sceneRepairLogService;
|
|
- @Value("${fyun.bucket:4dkankan}")
|
|
|
|
- private String bucket;
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ISceneProService sceneProService;
|
|
private ISceneProService sceneProService;
|
|
@Autowired
|
|
@Autowired
|
|
private IScenePlusExtService scenePlusExtService;
|
|
private IScenePlusExtService scenePlusExtService;
|
|
@Resource
|
|
@Resource
|
|
private FYunFileServiceInterface fYunFileService;
|
|
private FYunFileServiceInterface fYunFileService;
|
|
- @Autowired
|
|
|
|
- private RedisUtil redisUtil;
|
|
|
|
- @Value("${upgrade.caches-images:yes}")
|
|
|
|
- private String copyCachesImages;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void upgrade(long sceneProId, boolean reUpgrade) throws Exception{
|
|
public void upgrade(long sceneProId, boolean reUpgrade) throws Exception{
|
|
@@ -414,11 +416,18 @@ public class SceneUpgradeToV4Service implements ISceneUpgradeToV4Service {
|
|
}
|
|
}
|
|
|
|
|
|
//生成houseType并上传
|
|
//生成houseType并上传
|
|
- JSONObject houseTypeJsonByCad =
|
|
|
|
- CreateHouseJsonUtil.createHouseTypeJsonByCad(scenePlusExt.getDataSource() + "/results/floorplan_cad.json");
|
|
|
|
- if(Objects.nonNull(houseTypeJsonByCad)){
|
|
|
|
- fYunFileService.uploadFile(houseTypeJsonByCad.toJSONString().getBytes(StandardCharsets.UTF_8), userEditPath);
|
|
|
|
- fYunFileService.uploadFile(houseTypeJsonByCad.toJSONString().getBytes(StandardCharsets.UTF_8), userViewPath);
|
|
|
|
|
|
+ try {
|
|
|
|
+ JSONObject houseTypeJsonByCad =
|
|
|
|
+ CreateHouseJsonUtil.createHouseTypeJsonByCad(scenePlusExt.getDataSource() + "/results/floorplan_cad.json");
|
|
|
|
+ if(Objects.nonNull(houseTypeJsonByCad)){
|
|
|
|
+ fYunFileService.uploadFile(houseTypeJsonByCad.toJSONString().getBytes(StandardCharsets.UTF_8), userEditPath);
|
|
|
|
+ fYunFileService.uploadFile(houseTypeJsonByCad.toJSONString().getBytes(StandardCharsets.UTF_8), userViewPath);
|
|
|
|
+ }
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ log.error("生成houseType.json失败,num="+num, e);
|
|
|
|
+ if("yes".equals(createHouseType)){
|
|
|
|
+ throw e;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//生成scene.json
|
|
//生成scene.json
|