|
@@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.transaction.Transactional;
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
import java.io.*;
|
|
|
import java.time.LocalDateTime;
|
|
@@ -36,6 +37,7 @@ import java.util.*;
|
|
|
*/
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
+@Transactional
|
|
|
public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> implements SceneService {
|
|
|
|
|
|
@Autowired
|
|
@@ -265,8 +267,9 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
|
|
|
// TODO: 2021/1/8 0008 调用720云数据
|
|
|
search = entityMapper.search(param);
|
|
|
-
|
|
|
PageInfo<SceneEntity> page = new PageInfo<>(search);
|
|
|
+ log.info("page size: " + page.getSize());
|
|
|
+ log.info("page total: " + page.getTotal());
|
|
|
return Result.success(page);
|
|
|
}
|
|
|
|
|
@@ -616,28 +619,10 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
} else {
|
|
|
entity = this.findById(id);
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
-// if (index.size() == 0) {
|
|
|
-// entity.setIsIndex(1);
|
|
|
-//
|
|
|
-// HouseSceneIndexDto indexDto = new HouseSceneIndexDto();
|
|
|
-// indexDto.setId(entity.getHouseId());
|
|
|
-// indexDto.setSceneNum(entity.getSceneCode());
|
|
|
-// indexDto.setUpdateTime(LocalDateTime.now());
|
|
|
-// indexDto.setFcbHouseId(entity.getHengdaId());
|
|
|
-// Result result = houseFeign.updateHouseSceneIndex(indexDto);
|
|
|
-//
|
|
|
-// if (result.getCode() == 0) {
|
|
|
-// log.info("更新了初始场景到VR项目完成");
|
|
|
-// } else {
|
|
|
-// log.error("更新了初始场景到VR项目异常");
|
|
|
-// return Result.failure(result.getMsg());
|
|
|
-// }
|
|
|
-// }
|
|
|
entity.setUpdateTime(new Date());
|
|
|
this.update(entity);
|
|
|
log.info("更新VR模型完成");
|
|
|
}
|
|
|
-
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
@@ -695,7 +680,8 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
public Result editXml(XmlDataDto param) {
|
|
|
long start = System.currentTimeMillis();
|
|
|
String id = param.getId();
|
|
|
- SceneEntity entity = findById(id);
|
|
|
+// SceneEntity entity = findById(id);
|
|
|
+ SceneEntity entity = entityMapper.findByIdForUpdate(id);
|
|
|
if (entity == null) {
|
|
|
log.error("对象不存在,id : " + id);
|
|
|
return Result.failure("场景码不存在");
|
|
@@ -740,6 +726,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
|
|
|
jsonObject.put("hlookat", hlookat);
|
|
|
jsonObject.put("vlookat", vlookat);
|
|
|
entity.setInitVisual(jsonObject.toJSONString());
|
|
|
+
|
|
|
this.update(entity);
|
|
|
|
|
|
|