|
@@ -89,7 +89,7 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
/**
|
|
|
*
|
|
|
* @param file
|
|
|
- * @param houseId 房源id
|
|
|
+ * @param houseId 房源id(小区id)
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
@@ -194,6 +194,9 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
rabbitTemplate.convertAndSend(RabbitConfig.SECOND_HAND_EXCHANGE, RabbitConfig.SECOND_HAND_QUEUE_ROUTING, entity.getId());
|
|
|
log.info("二手房全景图入队成功: 场景码:{},场景id:{} ", sceneCode, entity.getId());
|
|
|
|
|
|
+ // 二手房信息更新到房车宝
|
|
|
+ updateSecondHandInfoToFcb(entity);
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -203,6 +206,51 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
|
|
|
|
|
|
@Override
|
|
|
+ public Result testUpdateInfo(String sceneCode) {
|
|
|
+ SecondHandEntity entity = entityMapper.findBySceneCode(sceneCode);
|
|
|
+ JSONObject jsonObject = updateSecondHandInfoToFcb(entity);
|
|
|
+ return Result.success(jsonObject);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private JSONObject updateSecondHandInfoToFcb( SecondHandEntity param){
|
|
|
+ JSONObject info = new JSONObject();
|
|
|
+ info.put("vrGardenId", param.getHouseId());
|
|
|
+ info.put("vrUrl", param.getWebSite());
|
|
|
+ info.put("vrCover", param.getIcon());
|
|
|
+ // 管理后台需要
|
|
|
+ info.put("updatorId", "");
|
|
|
+ info.put("updatorName", "");
|
|
|
+ // 房车宝aipNum
|
|
|
+ String apiNum = "101_saveGardenVr";
|
|
|
+ try {
|
|
|
+ log.info("请求aipNum:{}", apiNum);
|
|
|
+ log.info("请求参数:{}", info);
|
|
|
+ Object result = houseFeign.updateSecondHandInfo(apiNum, info);
|
|
|
+ JSONObject res = JSONObject.parseObject(result.toString());
|
|
|
+ log.info("管理后台响应值: {}", res);
|
|
|
+ // resultType:1 ,代表调用成功
|
|
|
+ Integer resultType = res.getInteger("resultType");
|
|
|
+ if (resultType == 1) {
|
|
|
+ log.info("二手房信息转发成功:场景码:{}, 小区id: {}",param.getSceneCode(), param.getHouseId() );
|
|
|
+ } else {
|
|
|
+ log.error("二手房信息转发失败:场景码:{}, 小区id: {}",param.getSceneCode(), param.getHouseId());
|
|
|
+ }
|
|
|
+
|
|
|
+ return res;
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("二手房信息转发失败:场景码:{}, 小区id: {}",param.getSceneCode(), param.getHouseId());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
public JSONObject jsonSearch(SecondHandPageDto param) {
|
|
|
startPage(param);
|
|
|
List<SecondHandEntity> search = entityMapper.search(param);
|
|
@@ -299,6 +347,9 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
entity.setIcon(icon);
|
|
|
entity.setUpdateTime(new Date());
|
|
|
this.update(entity);
|
|
|
+
|
|
|
+ //
|
|
|
+
|
|
|
log.info("更新初始画面成功");
|
|
|
return Result.success();
|
|
|
}
|
|
@@ -569,6 +620,8 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 检查是否有计算中的场景
|
|
|
*
|