12345678910111213141516171819202122232425262728293031323334353637383940 |
- package com.fdkankan.download.controller;
- import com.fdkankan.download.bean.ResultData;
- import com.fdkankan.download.service.IBatchDonloadService;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import org.springframework.web.multipart.MultipartFile;
- /**
- * <p>
- * TODO
- * </p>
- *
- * @author dengsixing
- * @since 2022/8/17
- **/
- @Slf4j
- @RestController
- @RequestMapping("/batchDownload")
- public class BatchDownloadController {
- @Autowired
- private IBatchDonloadService batchDonloadService;
- @PostMapping("download")
- public ResultData bacthDownload(@RequestParam(value = "file") MultipartFile file) throws Exception {
- return batchDonloadService.bacthDownload(file);
- }
- @PostMapping("getDownloadDetail")
- public ResultData getDownloadDetail(@RequestParam(value = "id") String uuid) throws Exception {
- return batchDonloadService.getDownloadDetail(uuid);
- }
- }
|