|
@@ -6,6 +6,7 @@ import cn.hutool.core.io.FileUtil;
|
|
|
import cn.hutool.core.lang.UUID;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.fdkankan.common.constant.CommonOperStatus;
|
|
|
import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
@@ -20,6 +21,9 @@ import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
import com.fdkankan.scene.bean.BodySegmentStatusBean;
|
|
|
import com.fdkankan.scene.entity.ScenePlus;
|
|
|
+import com.fdkankan.scene.entity.ScenePlusExt;
|
|
|
+import com.fdkankan.scene.service.IScenePlusExtService;
|
|
|
+import com.fdkankan.scene.service.IScenePlusService;
|
|
|
import com.fdkankan.scene.service.ISceneService;
|
|
|
//import com.fdkankan.scene.util.OssBodySegmentUtil;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
@@ -60,6 +64,10 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
private FYunFileServiceInterface fYunFileService;
|
|
|
@Autowired
|
|
|
public FYunFileConfig fYunFileConfig;
|
|
|
+ @Autowired
|
|
|
+ public IScenePlusService scenePlusService;
|
|
|
+ @Autowired
|
|
|
+ public IScenePlusExtService scenePlusExtService;
|
|
|
|
|
|
@Override
|
|
|
public ResultData uploadBodySegment(MultipartFile file, Integer rotate) throws Exception {
|
|
@@ -158,6 +166,24 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public void saveSceneOientation(Map<String, Object> map) {
|
|
|
+ String num = (String) map.get("num");
|
|
|
+ String orientation = (String)map.get("orientation");
|
|
|
+ Integer status = (Integer)map.get("status");
|
|
|
+ ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
+ if(Objects.isNull(scenePlus)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
+ if(status == 0){
|
|
|
+ scenePlusExtService.update(new LambdaUpdateWrapper<ScenePlusExt>().eq(ScenePlusExt::getId, scenePlusExt.getId()).setSql("orientation = null"));
|
|
|
+ }else{
|
|
|
+ scenePlusExt.setOrientation(orientation);
|
|
|
+ scenePlusExtService.updateById(scenePlusExt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public ResultData getBodySegmentStatus(String uuid) {
|
|
|
|
|
|
String progress = redisUtil.get(String.format(RedisKey.SCENE_BODY_SEGMENT, uuid));
|