|
@@ -4,10 +4,13 @@ import com.fdkankan.common.controller.BaseController;
|
|
|
import com.fdkankan.scene.service.ISceneProService;
|
|
|
import com.fdkankan.scene.vo.SceneEditVO;
|
|
|
import com.fdkankan.common.response.ResultData;
|
|
|
+import com.fdkankan.scene.vo.UploadFileParamVO;
|
|
|
import lombok.extern.log4j.Log4j2;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
/**
|
|
|
* 场景编辑管理
|
|
@@ -20,114 +23,83 @@ public class SceneEditController extends BaseController {
|
|
|
@Autowired
|
|
|
private ISceneProService sceneProService;
|
|
|
|
|
|
- @Value("${main.url}")
|
|
|
- private String mainUrl;
|
|
|
-
|
|
|
/**
|
|
|
- * 保存编辑的数据并生效
|
|
|
- * @return
|
|
|
- */
|
|
|
+ * <p>
|
|
|
+ 保存编辑的数据并生效
|
|
|
+ * </p>
|
|
|
+ * @author dengsixing
|
|
|
+ * @date 2022/1/12
|
|
|
+ * @param sceneEditVO
|
|
|
+ * @return com.fdkankan.common.response.ResultData
|
|
|
+ **/
|
|
|
@PostMapping(value = "/saveSceneInfo")
|
|
|
- public ResultData saveSceneInfo(@RequestBody SceneEditVO param) throws Exception {
|
|
|
- return sceneProService.saveSceneInfo(param);
|
|
|
+ public ResultData saveSceneInfo(@RequestBody SceneEditVO sceneEditVO) throws Exception {
|
|
|
+ return sceneProService.saveSceneInfo(sceneEditVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <p>
|
|
|
+ 单独保存tourList
|
|
|
+ * </p>
|
|
|
+ * @author dengsixing
|
|
|
+ * @date 2022/1/12
|
|
|
+ * @param sceneEditVO
|
|
|
+ * @return com.fdkankan.common.response.ResultData
|
|
|
+ **/
|
|
|
+ @PostMapping(value = "/saveTourList")
|
|
|
+ public ResultData saveTourList(@RequestBody SceneEditVO sceneEditVO) throws Exception {
|
|
|
+ return sceneProService.saveTourList(sceneEditVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <p>
|
|
|
+ 删除导览
|
|
|
+ * </p>
|
|
|
+ * @author dengsixing
|
|
|
+ * @date 2022/1/12
|
|
|
+ * @param sceneEditVO
|
|
|
+ * @return com.fdkankan.common.response.ResultData
|
|
|
+ **/
|
|
|
+ @PostMapping(value = "/deleteScreencap")
|
|
|
+ public ResultData deleteScreencap(@RequestBody SceneEditVO sceneEditVO) throws Exception {
|
|
|
+ return sceneProService.deleteScreencap(sceneEditVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * <p>
|
|
|
+ 删除录屏音频文件
|
|
|
+ * </p>
|
|
|
+ * @author dengsixing
|
|
|
+ * @date 2022/1/12
|
|
|
+ * @param sceneEditVO
|
|
|
+ * @return com.fdkankan.common.response.ResultData
|
|
|
+ **/
|
|
|
+ @PostMapping(value = "/deleteScreencapVoiceNew")
|
|
|
+ public ResultData deleteScreencapVoiceNew(@RequestBody SceneEditVO sceneEditVO) throws Exception {
|
|
|
+ return sceneProService.deleteScreencapVoice(sceneEditVO);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 单独保存tourList
|
|
|
+ * 上传音频
|
|
|
+ * @param file
|
|
|
* @return
|
|
|
*/
|
|
|
+ @PostMapping(value = "/uploadScreencapVoiceNew")
|
|
|
+ public ResultData uploadScreencapVoice(@RequestBody @Validated UploadFileParamVO param,
|
|
|
+ @RequestParam("file") MultipartFile file) throws Exception {
|
|
|
+ return sceneProService.uploadScreencapVoiceNew(param, file);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
- *
|
|
|
- * @param base
|
|
|
+ * 上传音频
|
|
|
+ * @param file
|
|
|
* @return
|
|
|
- * @throws Exception
|
|
|
*/
|
|
|
- @RequestMapping(value = "/saveTourList", method = RequestMethod.POST)
|
|
|
- public ResultData saveTourList(@RequestBody SceneEditVO base) throws Exception {
|
|
|
- return sceneProService.saveTourList(base);
|
|
|
+ @PostMapping(value = "/uploadScreencapVoiceNewV3")
|
|
|
+ public ResultData uploadScreencapVoiceV3(@RequestBody @Validated UploadFileParamVO param,
|
|
|
+ @RequestParam("file") MultipartFile file) throws Exception {
|
|
|
+ return sceneProService.uploadScreencapVoiceNewV3(param, file);
|
|
|
}
|
|
|
-
|
|
|
-// /**
|
|
|
-// * 删除导览
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// @RequestMapping(value = "/deleteScreencap", method = RequestMethod.POST)
|
|
|
-// public Result deleteScreencap(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
-// RequestSceneEdit base = new RequestSceneEdit();
|
|
|
-// base.setSceneNum(request.getParameter("sceneNum"));
|
|
|
-// return sceneProService.deleteScreencap(base);
|
|
|
-// }
|
|
|
-
|
|
|
-// /**
|
|
|
-// * 删除录屏音频文件
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// @ApiOperation("删除录屏音频文件")
|
|
|
-// @CheckCurrentUser(description = "删除录屏音频文件")
|
|
|
-// @RequestMapping(value = "/deleteScreencapVoiceNew", method = RequestMethod.POST)
|
|
|
-// @ApiImplicitParams({
|
|
|
-// @ApiImplicitParam(name = "sceneNum", value = "场景编码", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "type", value = "sound为sound录音,其余普通录音", dataType = "String")})
|
|
|
-// public Result deleteScreencapVoiceNew(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
-// RequestSceneEdit base = new RequestSceneEdit();
|
|
|
-// base.setSceneNum(request.getParameter("sceneNum"));
|
|
|
-// base.setType(request.getParameter("type"));
|
|
|
-// return sceneProService.deleteScreencapVoice(base);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 上传音频
|
|
|
-// * @param file
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// @ApiOperation("上传音频")
|
|
|
-// @CheckCurrentUser(description = "上传音频")
|
|
|
-// @RequestMapping(value = "/uploadScreencapVoiceNew", method = RequestMethod.POST)
|
|
|
-// @ApiImplicitParams({
|
|
|
-// @ApiImplicitParam(name = "sceneNum", value = "场景编码", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "type", value = "sound为sound录音,其余普通录音", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "fileName", value = "文件名", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "file", value = "文件", dataType = "MultipartFile")})
|
|
|
-// public Result uploadScreencapVoice(HttpServletRequest request, HttpServletResponse response, @RequestParam("file") MultipartFile file) throws Exception {
|
|
|
-// String sceneNum = request.getParameter("sceneNum");
|
|
|
-// String type = request.getParameter("type");
|
|
|
-// String fileName = request.getParameter("fileName");
|
|
|
-// String length = request.getParameter("length");
|
|
|
-// //替换视频,1为替换,0或没值为不替换
|
|
|
-// String replace = request.getParameter("replace");
|
|
|
-//
|
|
|
-// return sceneProService.uploadScreencapVoiceNew(sceneNum, type, fileName, file, length, replace);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 上传音频
|
|
|
-// * @param file
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// @ApiOperation("上传音频")
|
|
|
-// @CheckCurrentUser(description = "上传音频")
|
|
|
-// @RequestMapping(value = "/uploadScreencapVoiceNewV3", method = RequestMethod.POST)
|
|
|
-// @ApiImplicitParams({
|
|
|
-// @ApiImplicitParam(name = "sceneNum", value = "场景编码", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "type", value = "sound为sound录音,其余普通录音", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "fileName", value = "文件名", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "length", value = "当前视频大小", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "replace", value = "1为替换,0或没值为不替换", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "times", value = "所有房间的每个视频长度", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "index", value = "当前视频的序号", dataType = "String"),
|
|
|
-// @ApiImplicitParam(name = "file", value = "文件", dataType = "MultipartFile")})
|
|
|
-// public Result uploadScreencapVoiceV3(HttpServletRequest request, HttpServletResponse response, @RequestParam("file") MultipartFile file) throws Exception {
|
|
|
-// String sceneNum = request.getParameter("sceneNum");
|
|
|
-// String type = request.getParameter("type");
|
|
|
-// String fileName = request.getParameter("fileName");
|
|
|
-// String length = request.getParameter("length");
|
|
|
-// //替换视频,1为替换,0或没值为不替换
|
|
|
-// String replace = request.getParameter("replace");
|
|
|
-//
|
|
|
-// String times = request.getParameter("times");
|
|
|
-// String index = request.getParameter("index");
|
|
|
-// return sceneProService.uploadScreencapVoiceNewV3(sceneNum, type, fileName, file, length, replace, times, index);
|
|
|
-// }
|
|
|
//
|
|
|
// /**
|
|
|
// * 删除某部分音频
|