|
@@ -1,6 +1,5 @@
|
|
package com.fdkk.sxz.webApi.controller;
|
|
package com.fdkk.sxz.webApi.controller;
|
|
|
|
|
|
-import cn.hutool.core.io.FileUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.http.HttpRequest;
|
|
import cn.hutool.http.HttpRequest;
|
|
@@ -114,7 +113,7 @@ public class ImportDataController extends BaseController {
|
|
@AroundLog(name = "导入数据生成风格场景")
|
|
@AroundLog(name = "导入数据生成风格场景")
|
|
public Result importData(String sceneNum, String data, String styleName, String decoration,
|
|
public Result importData(String sceneNum, String data, String styleName, String decoration,
|
|
String styleNum, @RequestParam("file") MultipartFile file,
|
|
String styleNum, @RequestParam("file") MultipartFile file,
|
|
- String proLight, String buildType, String rooms) throws Exception {
|
|
|
|
|
|
+ String proLight, String buildType, String rooms, String sceneName) throws Exception {
|
|
if (StringUtils.isEmpty(sceneNum)) {
|
|
if (StringUtils.isEmpty(sceneNum)) {
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
}
|
|
}
|
|
@@ -140,6 +139,10 @@ public class ImportDataController extends BaseController {
|
|
sceneEntity.setRoamingPointUrl(roamingPointUrl);
|
|
sceneEntity.setRoamingPointUrl(roamingPointUrl);
|
|
sceneService.updateById(sceneEntity);
|
|
sceneService.updateById(sceneEntity);
|
|
}
|
|
}
|
|
|
|
+ if (sceneEntity.getSceneName().equals(sceneName)) {
|
|
|
|
+ sceneEntity.setSceneName(sceneName);
|
|
|
|
+ sceneService.updateById(sceneEntity);
|
|
|
|
+ }
|
|
if (StringUtils.isEmpty(styleNum)) {
|
|
if (StringUtils.isEmpty(styleNum)) {
|
|
Integer num = sceneStyleService.findLastNum(sceneNum);
|
|
Integer num = sceneStyleService.findLastNum(sceneNum);
|
|
if (num == null) {
|
|
if (num == null) {
|
|
@@ -512,7 +515,7 @@ public class ImportDataController extends BaseController {
|
|
@RequestMapping(value = "/createJson", method = RequestMethod.GET)
|
|
@RequestMapping(value = "/createJson", method = RequestMethod.GET)
|
|
@NoAuthentication
|
|
@NoAuthentication
|
|
@AroundLog(name = "生成房型数据")
|
|
@AroundLog(name = "生成房型数据")
|
|
- public JSONObject createJson(String num, String styleNum) {
|
|
|
|
|
|
+ public JSONObject createJson(String num, String styleNum, String sceneName) {
|
|
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
|
|
@@ -577,6 +580,8 @@ public class ImportDataController extends BaseController {
|
|
uploadToOssUtil.upload(basePath + File.separator + "roamingPoint.json",
|
|
uploadToOssUtil.upload(basePath + File.separator + "roamingPoint.json",
|
|
"data/data" + num + "/roamingPoint.json");
|
|
"data/data" + num + "/roamingPoint.json");
|
|
sceneEntity.setSceneNum(num);
|
|
sceneEntity.setSceneNum(num);
|
|
|
|
+ sceneEntity.setSceneName(sceneName);
|
|
|
|
+
|
|
String roamingPointUrl = "";
|
|
String roamingPointUrl = "";
|
|
Boolean existRoamingPoint = uploadToOssUtil.existFileToOSS("data/data" + num + "/roamingPoint.json", "4dkankan");
|
|
Boolean existRoamingPoint = uploadToOssUtil.existFileToOSS("data/data" + num + "/roamingPoint.json", "4dkankan");
|
|
if (existRoamingPoint) {
|
|
if (existRoamingPoint) {
|