|
@@ -151,21 +151,31 @@ public class HouseManagerController extends BaseController{
|
|
|
if(StringUtils.isBlank(tmHouse.getSceneNum())){
|
|
|
return Result.failure("该房源未生成场景码");
|
|
|
}
|
|
|
- String totalVrUrl = innerSceneVrHost + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ String totalOssQueryPath = "";
|
|
|
+ String totalVrUrl = innerSceneVrHost + sceneVrLink + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ "&houseId=" + tmHouse.getId();
|
|
|
- String localPath = imageLocalPath + "logo.png";
|
|
|
- String outPutImageName = System.currentTimeMillis() + ".jpg";
|
|
|
- String outPutImageResultPath = imageLocalPath + outPutImageName;
|
|
|
- try {
|
|
|
- DataUtils.createQRCode(totalVrUrl , outPutImageResultPath , localPath);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- log.info("生成分享二维码出现异常");
|
|
|
- return Result.failure("生成分享二维码出现异常");
|
|
|
+
|
|
|
+ if(StringUtils.isBlank(tmHouse.getQrCode())){
|
|
|
+ String localPath = imageLocalPath + "logo.png";
|
|
|
+ String outPutImageName = System.currentTimeMillis() + ".jpg";
|
|
|
+ String outPutImageResultPath = imageLocalPath + outPutImageName;
|
|
|
+ try {
|
|
|
+ DataUtils.createQRCode(totalVrUrl , outPutImageResultPath , localPath);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.info("生成分享二维码出现异常");
|
|
|
+ return Result.failure("生成分享二维码出现异常");
|
|
|
+ }
|
|
|
+ String resultOssPath = ossPath + outPutImageName;
|
|
|
+ alibabaOssHelper.doUploadThenDelete(outPutImageResultPath , resultOssPath);
|
|
|
+ totalOssQueryPath = ossQueryUrl + resultOssPath;
|
|
|
+
|
|
|
+ tmHouse.setQrCode(totalOssQueryPath);
|
|
|
+ tmHouse.setUpdateTime(LocalDateTime.now());
|
|
|
+ tmHouseService.updateHouse(tmHouse);
|
|
|
+ }else{
|
|
|
+ totalOssQueryPath = tmHouse.getQrCode();
|
|
|
}
|
|
|
- String resultOssPath = ossPath + outPutImageName;
|
|
|
- alibabaOssHelper.doUploadThenDelete(outPutImageResultPath , resultOssPath);
|
|
|
- String totalOssQueryPath = ossQueryUrl + resultOssPath;
|
|
|
|
|
|
Map<String , Object> resultMap = new HashMap<>();
|
|
|
resultMap.put("QrCode" , totalOssQueryPath);
|
|
@@ -201,7 +211,7 @@ public class HouseManagerController extends BaseController{
|
|
|
String downLoanVideoPath = FileUtils.parseFile(file, imageLocalPath , newFileName);
|
|
|
log.info("照片文件已经下载到本地:{}", downLoanVideoPath);
|
|
|
|
|
|
- String totalVrUrl = outerSceneVrHost + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ String totalVrUrl = outerSceneVrHost + sceneVrLink + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ "&houseId=" + tmHouse.getId();
|
|
|
String outPutImageName = System.currentTimeMillis() + ".jpg";
|
|
|
String outPutImageResultPath = imageLocalPath + outPutImageName;
|
|
@@ -216,6 +226,10 @@ public class HouseManagerController extends BaseController{
|
|
|
alibabaOssHelper.doUploadThenDelete(outPutImageResultPath , resultOssPath);
|
|
|
String totalOssQueryPath = ossQueryUrl + resultOssPath;
|
|
|
|
|
|
+ tmHouse.setQrCode(totalOssQueryPath);
|
|
|
+ tmHouse.setUpdateTime(LocalDateTime.now());
|
|
|
+ tmHouseService.updateHouse(tmHouse);
|
|
|
+
|
|
|
Map<String , Object> resultMap = new HashMap<>();
|
|
|
resultMap.put("QrCode" , totalOssQueryPath);
|
|
|
resultMap.put("vrLink" , totalVrUrl);
|
|
@@ -358,9 +372,9 @@ public class HouseManagerController extends BaseController{
|
|
|
if(StringUtils.isBlank(tmHouse.getFcbHouseId())){
|
|
|
return Result.failure("更新场景码必须上送房车宝的房源ID");
|
|
|
}
|
|
|
- String innerHostVrLink = innerSceneVrHost + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ String innerHostVrLink = innerSceneVrHost + sceneVrLink + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ "&houseId=" + tmHouse.getId();
|
|
|
- String outerHostVrLink = outerSceneVrHost + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ String outerHostVrLink = outerSceneVrHost + sceneVrLink + tmHouse.getSceneNum() + "&prodId=" + tmHouse.getFcbHouseId()
|
|
|
+ "&houseId=" + tmHouse.getId();
|
|
|
tmHouse.setVrLink(outerHostVrLink);
|
|
|
tmHouse.setInnerVrLink(innerHostVrLink);
|