Przeglądaj źródła

1.3兼容1.2旧接口

wuweihao 2 lat temu
rodzic
commit
5a3e7dbe63

+ 39 - 0
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/FodderController.java

@@ -47,6 +47,45 @@ public class FodderController extends BaseController {
     }
 
 
+    /**
+     * 2022-12--6 旧接口停用
+     * @param file
+     * @param type
+     * @param tempId
+     * @return
+     */
+    @ApiOperation(value = "v1.2-上传素材", notes = "type:类型, 全景图:pano, 图片:image, 音频:audio, 视频:video, temId: 前端临时Id")
+    @PostMapping("/upload/{type}/{tempId}")
+    public Result upload(MultipartFile file, @PathVariable String type, @PathVariable String tempId) {
+
+        if (file == null) {
+            log.error("文件不能为空");
+            return Result.failure(ErrorEnum.FAILURE_CODE_3020.code(),"文件不能为空");
+        }
+        FodderUploadDto dto = new FodderUploadDto();
+        dto.setFile(file);
+        dto.setTemId(tempId);
+        dto.setType(type);
+        dto.setDirId(1L); // 默认跟目录
+        return fodderService.upload(dto);
+    }
+
+
+
+    /**
+     *  2022-12--6 旧接口停用
+     *  2021-04-30
+     *  目前只返回计算成功的数据
+     * @param param
+     * @return
+     */
+    @ApiOperation(value = "v1.2-列表", position = 1)
+    @PostMapping("/list")
+    public Result<FodderEntity> list(@RequestBody FodderPageDto param) {
+        return fodderService.search(param);
+    }
+
+