BatchDownloadController.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package com.fdkankan.download.controller;
  2. import com.fdkankan.download.bean.ResultData;
  3. import com.fdkankan.download.service.IBatchDonloadService;
  4. import lombok.extern.slf4j.Slf4j;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.PostMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RequestParam;
  9. import org.springframework.web.bind.annotation.RestController;
  10. import org.springframework.web.multipart.MultipartFile;
  11. /**
  12. * <p>
  13. * TODO
  14. * </p>
  15. *
  16. * @author dengsixing
  17. * @since 2022/8/17
  18. **/
  19. @Slf4j
  20. @RestController
  21. @RequestMapping("/batchDownload")
  22. public class BatchDownloadController {
  23. @Autowired
  24. private IBatchDonloadService batchDonloadService;
  25. @PostMapping("download")
  26. public ResultData bacthDownload(@RequestParam(value = "file") MultipartFile file) throws Exception {
  27. return batchDonloadService.bacthDownload(file);
  28. }
  29. @PostMapping("getDownloadDetail")
  30. public ResultData getDownloadDetail(@RequestParam(value = "id") String uuid) throws Exception {
  31. return batchDonloadService.getDownloadDetail(uuid);
  32. }
  33. }