|
@@ -1,7 +1,6 @@
|
|
|
package fcb.project.manager.core.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import fcb.project.manager.base.entity.ContextTokenBean;
|
|
@@ -14,7 +13,6 @@ import fcb.project.manager.base.service.impl.TmAuditServiceImpl;
|
|
|
import fcb.project.manager.base.service.impl.TmEstateServiceImpl;
|
|
|
import fcb.project.manager.base.service.impl.TmHouseServiceImpl;
|
|
|
import fcb.project.manager.base.utils.DataUtils;
|
|
|
-import fcb.project.manager.core.feignInterfaces.SceneFeign;
|
|
|
import fdage.back.sdk.base.entity.Result;
|
|
|
import fdage.back.sdk.base.enums.ResultCodeEnum;
|
|
|
import fdage.back.sdk.base.exception.CommonBaseException;
|
|
@@ -31,7 +29,6 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.client.RestTemplate;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -62,8 +59,11 @@ public class HouseManagerController {
|
|
|
@Value("${image.local.path}")
|
|
|
private String imageLocalPath;
|
|
|
|
|
|
- @Value("${vr.scene.host}")
|
|
|
- private String sceneVrHost;
|
|
|
+ @Value("${inner.vr.scene.host}")
|
|
|
+ private String innerSceneVrHost;
|
|
|
+
|
|
|
+ @Value("${outer.vr.scene.host}")
|
|
|
+ private String outerSceneVrHost;
|
|
|
|
|
|
@Value("${vr.scene.link}")
|
|
|
private String sceneVrLink;
|
|
@@ -166,7 +166,7 @@ public class HouseManagerController {
|
|
|
if(StringUtils.isBlank(tmHouse.getSceneNum())){
|
|
|
return Result.failure("改房源未生成场景码");
|
|
|
}
|
|
|
- String totalVrUrl = sceneVrHost + sceneVrLink + tmHouse.getId() + "&s=" + tmHouse.getSceneNum();
|
|
|
+ String totalVrUrl = innerSceneVrHost + sceneVrLink + tmHouse.getId() + "&s=" + tmHouse.getSceneNum();
|
|
|
String localPath = imageLocalPath + "logo.png";
|
|
|
String outPutImageName = System.currentTimeMillis() + ".jpg";
|
|
|
String outPutImageResultPath = imageLocalPath + outPutImageName;
|
|
@@ -215,7 +215,7 @@ public class HouseManagerController {
|
|
|
String downLoanVideoPath = FileUtils.parseFile(file, imageLocalPath , newFileName);
|
|
|
log.info("照片文件已经下载到本地:{}", downLoanVideoPath);
|
|
|
|
|
|
- String totalVrUrl = sceneVrHost + sceneVrLink + tmHouse.getId() + "&s=" + tmHouse.getSceneNum();
|
|
|
+ String totalVrUrl = innerSceneVrHost + sceneVrLink + tmHouse.getId() + "&s=" + tmHouse.getSceneNum();
|
|
|
String outPutImageName = System.currentTimeMillis() + ".jpg";
|
|
|
String outPutImageResultPath = imageLocalPath + outPutImageName;
|
|
|
try {
|
|
@@ -380,6 +380,18 @@ public class HouseManagerController {
|
|
|
if(null == dbHouse){
|
|
|
return Result.failure("房源不存在");
|
|
|
}
|
|
|
+ if(StringUtils.isBlank(dbHouse.getSceneNum()) && StringUtils.isNotBlank(tmHouse.getSceneNum())){
|
|
|
+ //新增场景码,这时候需要生成内网和外网场景码的链接
|
|
|
+ if(StringUtils.isBlank(tmHouse.getFcbHouseId())){
|
|
|
+ return Result.failure("更新场景码必须上送房车宝的房源ID");
|
|
|
+ }
|
|
|
+ String innerHostVrLink = innerSceneVrHost + sceneVrLink
|
|
|
+ + dbHouse.getId() + "&s=" + tmHouse.getSceneNum() + "&h=" + tmHouse.getFcbHouseId();
|
|
|
+ String outerHostVrLink = outerSceneVrHost + sceneVrLink
|
|
|
+ + dbHouse.getId() + "&s=" + tmHouse.getSceneNum() + "&h=" + tmHouse.getFcbHouseId();
|
|
|
+ tmHouse.setVrLink(outerHostVrLink);
|
|
|
+ tmHouse.setInnerVrLink(innerHostVrLink);
|
|
|
+ }
|
|
|
if(tmHouseService.updateHouse(tmHouse)){
|
|
|
return Result.success("修改成功");
|
|
|
}else{
|