|
@@ -209,6 +209,8 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
return Result.success(entity);
|
|
@@ -222,14 +224,19 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
* @return
|
|
|
*/
|
|
|
private Result getHouseStatus(String houseId){
|
|
|
- Result result = houseFeign.findByHouseId(houseId);
|
|
|
+ Result result = null;
|
|
|
+ try {
|
|
|
+ result = houseFeign.findByHouseId(houseId);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
String status = null;
|
|
|
if (result.getCode() == 0) {
|
|
|
Object data = result.getData();
|
|
|
JSONObject jsonObject = JSON.parseObject(data.toString());
|
|
|
status = jsonObject.getString("status");
|
|
|
log.info("house status: " + status);
|
|
|
-
|
|
|
+ log.warn("可以正常编辑");
|
|
|
if (status.equals("1")) {
|
|
|
log.warn("审核中不能编辑");
|
|
|
return Result.failure(7005, "审核中不能编辑");
|
|
@@ -399,6 +406,15 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public Result updateIcon(String sceneCode, String icon) {
|
|
|
+ log.info("sceneCode: {}", sceneCode);
|
|
|
+ log.info("icon: {}", icon);
|
|
|
+ entityMapper.updateIcon(sceneCode, icon);
|
|
|
+ log.info("更新VR模型缩略图完成");
|
|
|
+ return Result.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public Result saveUseHots(UseHotsDto param) {
|
|
|
String id = param.getId();
|
|
|
SceneEntity entity = this.findById(id);
|
|
@@ -466,12 +482,16 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
log.info("update houseDto: " + houseDto.toString());
|
|
|
|
|
|
- Result result = houseFeign.updateHouse(houseDto);
|
|
|
- if (result.getCode() == 0) {
|
|
|
- log.info("更新房源信息完成");
|
|
|
- } else {
|
|
|
- log.error("更新房源信息异常");
|
|
|
- return Result.failure(result.getMsg());
|
|
|
+ try {
|
|
|
+ Result result = houseFeign.updateHouse(houseDto);
|
|
|
+ if (result.getCode() == 0) {
|
|
|
+ log.info("更新房源信息完成");
|
|
|
+ } else {
|
|
|
+ log.error("更新房源信息异常");
|
|
|
+ return Result.failure(result.getMsg());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
log.info("更新房源vr项目完成");
|
|
@@ -498,6 +518,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
if (resStatus != null) {
|
|
|
return resStatus;
|
|
|
}
|
|
|
+ log.info("检查状态完成,可以编辑");
|
|
|
|
|
|
|
|
|
// 设置初始场景
|
|
@@ -508,21 +529,21 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
|
|
|
|
|
|
- // TODO: 2021/1/8 0008 更新伟玉房源表单接口
|
|
|
- HouseSceneIndexDto houseSceneIndexDto = new HouseSceneIndexDto();
|
|
|
- houseSceneIndexDto.setId(houseId);
|
|
|
-
|
|
|
- // 初始场景
|
|
|
- houseSceneIndexDto.setSceneNum(entity.getSceneCode());
|
|
|
- houseSceneIndexDto.setUpdateTime(LocalDateTime.now());
|
|
|
- houseSceneIndexDto.setFcbHouseId(entity.getHouseId());
|
|
|
- Result result = houseFeign.updateHouseSceneIndex(houseSceneIndexDto);
|
|
|
- if (result.getCode() == 0) {
|
|
|
- log.info("更新房源updateHouse完成");
|
|
|
- } else {
|
|
|
- log.error("更新房源updateHouse异常");
|
|
|
- return Result.failure(result.getMsg());
|
|
|
- }
|
|
|
+ // TODO: 2021/1/9 0008 更新伟玉房源表单接口
|
|
|
+// HouseSceneIndexDto houseSceneIndexDto = new HouseSceneIndexDto();
|
|
|
+// houseSceneIndexDto.setId(houseId);
|
|
|
+//
|
|
|
+// // 初始场景
|
|
|
+// houseSceneIndexDto.setSceneNum(entity.getSceneCode());
|
|
|
+// houseSceneIndexDto.setUpdateTime(LocalDateTime.now());
|
|
|
+// houseSceneIndexDto.setFcbHouseId(entity.getHouseId());
|
|
|
+// Result result = houseFeign.updateHouseSceneIndex(houseSceneIndexDto);
|
|
|
+// if (result.getCode() == 0) {
|
|
|
+// log.info("更新房源updateHouse完成");
|
|
|
+// } else {
|
|
|
+// log.error("更新房源updateHouse异常");
|
|
|
+// return Result.failure(result.getMsg());
|
|
|
+// }
|
|
|
|
|
|
return Result.success();
|
|
|
}
|
|
@@ -770,15 +791,23 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
indexDto.setId(entity.getHouseId());
|
|
|
indexDto.setSceneNum(entity.getSceneCode());
|
|
|
indexDto.setUpdateTime(LocalDateTime.now());
|
|
|
+ // 恒大id必须更新到管理后台 2021-03-08
|
|
|
indexDto.setFcbHouseId(entity.getHengdaId());
|
|
|
- Result result = houseFeign.updateHouseSceneIndex(indexDto);
|
|
|
+ Result result = null;
|
|
|
+ try {
|
|
|
+ result = houseFeign.updateHouseSceneIndex(indexDto);
|
|
|
|
|
|
- if (result.getCode() == 0) {
|
|
|
- log.info("更新了初始场景到VR项目完成");
|
|
|
- } else {
|
|
|
- log.error("更新了初始场景到VR项目异常");
|
|
|
- return Result.failure(result.getMsg());
|
|
|
+ if (result.getCode() == 0) {
|
|
|
+ log.info("更新了初始场景到VR项目完成");
|
|
|
+ } else {
|
|
|
+ log.error("更新了初始场景到VR项目异常");
|
|
|
+ return Result.failure(result.getMsg());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
entity.setId(RandomUtils.getUuid());
|
|
|
entity.setType("house");
|