|
@@ -18,7 +18,6 @@ import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
|
- * 背景音乐保存业务处理器
|
|
|
* </p>
|
|
|
*
|
|
|
* @author dengsixing
|
|
@@ -35,29 +34,29 @@ public class ScreenshotHandler implements ISaveUploadHandler {
|
|
|
@Override
|
|
|
public ResultData save(String num, String fileInfo) {
|
|
|
|
|
|
- ScenePro scenePro = sceneProService.findBySceneNum(num);
|
|
|
- if(Objects.isNull(scenePro))
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
-
|
|
|
- JSONObject fileInfoJson = JSON.parseObject(fileInfo);
|
|
|
- String initialPoint = fileInfoJson.getString("initialPoint");
|
|
|
-
|
|
|
- // TODO: 2022/1/28旧代码中根据thumbBigImg.jpg生成thumbSmallImg.jpg,这里暂时不知道要不要,先留着
|
|
|
-
|
|
|
- SceneEditInfo sceneEditInfoDb = sceneEditInfoService.getBySceneProId(scenePro.getId());
|
|
|
- if(Objects.nonNull(sceneEditInfoDb)){
|
|
|
- sceneEditInfoService.update(new LambdaUpdateWrapper<SceneEditInfo>()
|
|
|
- .setSql("version=version+" + 1)
|
|
|
- .set(SceneEditInfo::getInitialPoint, initialPoint)
|
|
|
- .set(SceneEditInfo::getThumbStatus, CommonStatus.YES.code())
|
|
|
- .eq(SceneEditInfo::getId, sceneEditInfoDb.getId()));
|
|
|
- }else{
|
|
|
- sceneEditInfoDb = new SceneEditInfo();
|
|
|
- sceneEditInfoDb.setSceneProId(scenePro.getId());
|
|
|
- sceneEditInfoDb.setInitialPoint(initialPoint);
|
|
|
- sceneEditInfoDb.setThumbStatus(CommonStatus.YES.code());
|
|
|
- sceneEditInfoService.save(sceneEditInfoDb);
|
|
|
- }
|
|
|
+// ScenePro scenePro = sceneProService.findBySceneNum(num);
|
|
|
+// if(Objects.isNull(scenePro))
|
|
|
+// throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
+//
|
|
|
+// JSONObject fileInfoJson = JSON.parseObject(fileInfo);
|
|
|
+// String initialPoint = fileInfoJson.getString("initialPoint");
|
|
|
+//
|
|
|
+// // TODO: 2022/1/28旧代码中根据thumbBigImg.jpg生成thumbSmallImg.jpg,这里暂时不知道要不要,先留着
|
|
|
+//
|
|
|
+// SceneEditInfo sceneEditInfoDb = sceneEditInfoService.getBySceneProId(scenePro.getId());
|
|
|
+// if(Objects.nonNull(sceneEditInfoDb)){
|
|
|
+// sceneEditInfoService.update(new LambdaUpdateWrapper<SceneEditInfo>()
|
|
|
+// .setSql("version=version+" + 1)
|
|
|
+// .set(SceneEditInfo::getInitialPoint, initialPoint)
|
|
|
+// .set(SceneEditInfo::getThumbStatus, CommonStatus.YES.code())
|
|
|
+// .eq(SceneEditInfo::getId, sceneEditInfoDb.getId()));
|
|
|
+// }else{
|
|
|
+// sceneEditInfoDb = new SceneEditInfo();
|
|
|
+// sceneEditInfoDb.setSceneProId(scenePro.getId());
|
|
|
+// sceneEditInfoDb.setInitialPoint(initialPoint);
|
|
|
+// sceneEditInfoDb.setThumbStatus(CommonStatus.YES.code());
|
|
|
+// sceneEditInfoService.save(sceneEditInfoDb);
|
|
|
+// }
|
|
|
|
|
|
return ResultData.ok();
|
|
|
}
|