|
@@ -157,11 +157,9 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
// 缩略图,使用切图那个thumb.jpg
|
|
|
// 压缩图片并上传oss
|
|
|
-// String iconPath = fileUtils.compressImgAndUploadOss2(panoPath, configConstant.ossBasePath, configConstant.ossDomain);
|
|
|
// 全景图缩略图统一命名规则: http:// oss/cms_pano_fcb/image/thumb_sceneCode.jpg
|
|
|
String iconPath = fileUtils.compressImgAndUploadOss2(
|
|
|
panoPath, configConstant.filePath, configConstant.ossBasePath, configConstant.ossDomain, 600, 300, "image/thumb_"+sceneCode+".jpg");
|
|
|
-// String iconPath = fileUtils.compressImgAndUploadOss(panoPath, configConstant.ossBasePath, configConstant.ossDomain);
|
|
|
log.info("iconPath:" + iconPath);
|
|
|
entity.setIcon(iconPath);
|
|
|
entity.setStatus(1);
|
|
@@ -179,13 +177,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
log.info("webSite: " + webSite);
|
|
|
entity.setWebSite(webSite);
|
|
|
|
|
|
- // 设置初始场景
|
|
|
-// SceneEntity index = entityMapper.getIndex(houseId);
|
|
|
- List<SceneEntity> index = entityMapper.getIndex(houseId);
|
|
|
- if (index.size() == 0) {
|
|
|
log.info("更新hengdaId到管理后台");
|
|
|
- entity.setIsIndex(1);
|
|
|
-
|
|
|
// 更新到VR项目
|
|
|
HouseSceneIndexDto houseSceneIndexDto = new HouseSceneIndexDto();
|
|
|
houseSceneIndexDto.setId(houseId);
|
|
@@ -194,12 +186,6 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
houseSceneIndexDto.setFcbHouseId(hengdaId);
|
|
|
Result result = houseFeign.updateHouseSceneIndex(houseSceneIndexDto);
|
|
|
|
|
|
-// JSONObject jsonObject = new JSONObject();
|
|
|
-// jsonObject.put("id", houseId);
|
|
|
-// jsonObject.put("sceneNum", houseId);
|
|
|
-// jsonObject.put("updateTime", houseId);
|
|
|
-// jsonObject.put("fcbHouseId", houseId);
|
|
|
-// jsonObject.put("id", houseId);
|
|
|
|
|
|
if (result.getCode() == 0) {
|
|
|
log.info("新场景码到VR项目完成");
|
|
@@ -210,16 +196,14 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
log.info("result: " + result.toString());
|
|
|
|
|
|
log.info("更新初始场景到VR项目完成");
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
this.save(entity);
|
|
|
|
|
|
//发消息到mq
|
|
|
rabbitTemplate.convertAndSend(RabbitConfig.PANO_EXCHANGE, RabbitConfig.PANO_QUEUE_ROUTING, entity.getId());
|
|
|
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- } catch (Exception e) {
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
@@ -364,7 +348,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
SceneEntity entity = null;
|
|
|
|
|
|
- List<SceneEntity> index = entityMapper.getIndex(param.getHouseId());
|
|
|
+// List<SceneEntity> index = entityMapper.getIndex(param.getHouseId());
|
|
|
|
|
|
if ( id == null) {
|
|
|
entity = entityMapper.findByVrModelIdAndHouseId(param.getVrModelId(), param.getHouseId());
|
|
@@ -381,8 +365,8 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
- if (index.size() == 0) {
|
|
|
- entity.setIsIndex(1);
|
|
|
+// if (index.size() == 0) {
|
|
|
+// entity.setIsIndex(1);
|
|
|
|
|
|
// HouseSceneIndexDto indexDto = new HouseSceneIndexDto();
|
|
|
// indexDto.setId(entity.getHouseId());
|
|
@@ -397,7 +381,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
// log.error("更新了初始场景到VR项目异常");
|
|
|
// return Result.failure(result.getMsg());
|
|
|
// }
|
|
|
- }
|
|
|
+// }
|
|
|
entity.setId(RandomUtils.getUuid());
|
|
|
entity.setType("house");
|
|
|
entity.setStatus(3);
|
|
@@ -779,7 +763,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
SceneEntity entity = null;
|
|
|
|
|
|
- List<SceneEntity> index = entityMapper.getIndex(param.getHouseId());
|
|
|
+// List<SceneEntity> index = entityMapper.getIndex(param.getHouseId());
|
|
|
|
|
|
if ( id == null) {
|
|
|
entity = entityMapper.findByVrModelIdAndHouseId(param.getVrModelId(), param.getHouseId());
|
|
@@ -796,8 +780,8 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
- if (index.size() == 0) {
|
|
|
- entity.setIsIndex(1);
|
|
|
+// if (index.size() == 0) {
|
|
|
+// entity.setIsIndex(1);
|
|
|
|
|
|
HouseSceneIndexDto indexDto = new HouseSceneIndexDto();
|
|
|
indexDto.setId(entity.getHouseId());
|
|
@@ -820,7 +804,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
}
|
|
|
|
|
|
|
|
|
- }
|
|
|
+// }
|
|
|
entity.setId(RandomUtils.getUuid());
|
|
|
entity.setType("house");
|
|
|
entity.setStatus(3);
|