| | |
| | | import com.dji.sample.media.model.MediaFileQueryParam; |
| | | import com.dji.sample.media.service.IFileService; |
| | | import com.dji.sample.media.util.ImageDownloaderAndCompressor; |
| | | import com.dji.sample.media.util.MinioFileDownloader; |
| | | import com.drew.imaging.ImageProcessingException; |
| | | import org.apache.ibatis.annotations.Update; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.mock.web.MockHttpServletResponse; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | @RequestParam(defaultValue = "1") int page, |
| | | @RequestParam(name = "page_size", defaultValue = "10") int pageSize |
| | | ) { |
| | | return ResponseResult.success(fileService.getJobId(page, pageSize, workspaceId)); |
| | | return ResponseResult.success(fileService.mediaQuerys(page, pageSize, workspaceId)); |
| | | } |
| | | |
| | | @PutMapping("/examine") |
| | |
| | | @RequestParam(name = "updateStart", required = false) Long photoStart, |
| | | @RequestParam(name = "updateEnd", required = false) Long photoEnd, |
| | | @RequestParam(name = "jobName", required = false) String jobName, |
| | | @RequestParam(name = "jobId", required = false) String jobId, |
| | | @RequestParam(required = false) String type |
| | | ) { |
| | | |
| | | return ResponseResult.success(fileService.mediaQuery(page, pageSize, updateStart, updateEnd, photoStart, photoEnd, jobName, workspaceId, type)); |
| | | return ResponseResult.success(fileService.mediaQuery(page, pageSize, updateStart, updateEnd, photoStart, photoEnd, jobName, workspaceId, type,jobId)); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/download-images") |
| | | public void downloadImages(@RequestParam String jobId, HttpServletResponse response) { |
| | | fileService.downloadImages(jobId,response); |
| | | @PostMapping("/download-images") |
| | | public ResponseResult downloadImages(@RequestBody List<String> jobIds) { |
| | | return fileService.downloadImages(jobIds); |
| | | } |
| | | |
| | | } |