|
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.transaction.Transactional;
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
import java.util.*;
|
|
@@ -76,6 +77,9 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
@Autowired
|
|
|
AsyncTask asyncTask;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ HttpServletRequest httpServletRequest;
|
|
|
+
|
|
|
@Override
|
|
|
public IBaseMapper<SecondHandEntity, String> getBaseMapper() {
|
|
|
return this.entityMapper;
|
|
@@ -86,7 +90,6 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
*
|
|
|
* @param file
|
|
|
* @param houseId 房源id
|
|
|
- * @param groupId 小区id
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
@@ -180,8 +183,8 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
entity.setSceneTitle(entity.getFileName());
|
|
|
|
|
|
// todo webSite待定
|
|
|
- // /hengda.html?m=场景码&prodId=房车宝楼盘ID&houseId=自己维护的楼盘ID
|
|
|
- String webSite = "/hengda.html?m=" + sceneCode + "&prodId=" + hengDaId + "&houseId=" + houseId;
|
|
|
+ // /hengda.html?m=场景码&prodId=房车宝楼盘ID&houseId=自己维护的楼盘ID, businessType=2 (二手房)
|
|
|
+ String webSite = "/hengda.html?m=" + sceneCode + "&prodId=" + hengDaId + "&houseId=" + houseId + "&businessType=2";
|
|
|
log.info("webSite: " + webSite);
|
|
|
entity.setWebSite(webSite);
|
|
|
|
|
@@ -416,7 +419,10 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
|
|
|
@Override
|
|
|
public Result vrFindBySceneCode(String sceneCode) {
|
|
|
+
|
|
|
log.info("VR模模型-根据场景码查询: " + sceneCode);
|
|
|
+
|
|
|
+
|
|
|
// 此方法建议把返回值改回list值会更安全
|
|
|
List<SecondHandEntity> list = entityMapper.listFindBySceneCode(sceneCode);
|
|
|
log.info("使用中的VR模型数量:" + list.size());
|
|
@@ -436,6 +442,8 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
*/
|
|
|
@Override
|
|
|
public Result findVrModel(SceneRroPageDto param) {
|
|
|
+ String token1 = httpServletRequest.getHeader("token");
|
|
|
+ log.info("头部token: {}", token1);
|
|
|
// TODO: 2021/1/8 0008 查找4dkk场景数据,当前区域公司下的模型
|
|
|
@NotBlank(message = "token不能为空") String token = param.getToken();
|
|
|
// 只获取计算成功的, 0:计算成功
|
|
@@ -549,6 +557,17 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Result houseCanEdit(String houseId) {
|
|
|
+ return Result.success(canEdit(houseId));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Result findByHouseId(String houseId, Integer status) {
|
|
|
+ List<SecondHandEntity> entities = entityMapper.findByHouseIdAndGtStatus(houseId, status);
|
|
|
+ return Result.success(entities);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 检查是否有计算中的场景
|