| | |
| | | } |
| | | |
| | | @Override |
| | | public void importKmzFile(MultipartFile file, String workspaceId, String creator, String patchesId) { |
| | | public void importKmzFile(MultipartFile file, String workspaceId, String creator, String patchesId,String spotInFreckle) { |
| | | Optional<WaylineFileDTO> waylineFileOpt = validKmzFile(file); |
| | | if (waylineFileOpt.isEmpty()) { |
| | | throw new RuntimeException("文件格式错误"); |
| | |
| | | WaylineFileDTO waylineFile = waylineFileOpt.get(); |
| | | waylineFile.setWaylineId(workspaceId); |
| | | waylineFile.setUsername(creator); |
| | | |
| | | waylineFile.setSpotInFreckle(spotInFreckle); |
| | | ossService.putObject(OssConfiguration.bucket, waylineFile.getObjectKey(), file.getInputStream()); |
| | | this.saveWaylineFiles(workspaceId, waylineFile, patchesId); |
| | | } catch (IOException e) { |
| | |
| | | .favorited(file.getFavorited()) |
| | | .sign(file.getSign()) |
| | | .patchesId(file.getPatchesId()) |
| | | .spotInFreckle(file.getSpotInFreckle()) |
| | | .build(); |
| | | } |
| | | |