rain
2024-07-04 82e4e5f6129be2e691138cd8b8ea3262e64943af
src/main/java/com/dji/sample/wayline/controller/WaylineFileController.java
@@ -197,13 +197,15 @@
    @SysLogAnnotation(operModul = "航线库", operType = "上传", operDesc = "上传kmz航线文件")
    public ResponseResult importKmzFile(@PathVariable(name = "workspace_id") String workspaceId,
                                        HttpServletRequest request, MultipartFile file,
                                        @RequestParam String patchesId) {
                                        @RequestParam(required = false) String patchesId,
                                        @RequestParam(required = false) String spotInFreckle
    ) {
        if (Objects.isNull(file)) {
            return ResponseResult.error("未上传文件");
        }
        CustomClaim customClaim = (CustomClaim)request.getAttribute(TOKEN_CLAIM);
        String creator = customClaim.getUsername();
        waylineFileService.importKmzFile(file, workspaceId, creator,patchesId);
        waylineFileService.importKmzFile(file, workspaceId, creator,patchesId,spotInFreckle);
        return ResponseResult.success();
    }