ExportAsyncService.java 952 B

12345678910111213141516171819202122232425262728293031323334
  1. package com.xy.service;
  2. import com.xy.annotate.RestMappingController;
  3. import com.xy.dto.DeviceInfoDto;
  4. import com.xy.utils.R;
  5. import io.swagger.annotations.Api;
  6. import io.swagger.annotations.ApiOperation;
  7. import lombok.RequiredArgsConstructor;
  8. import org.springframework.stereotype.Service;
  9. import org.springframework.web.bind.annotation.PostMapping;
  10. import org.springframework.web.bind.annotation.RequestBody;
  11. import javax.validation.Valid;
  12. /***
  13. * 异步导出处理
  14. * @author 谭斌
  15. * @date 2023/3/4 10:44
  16. */
  17. @Service
  18. @RequiredArgsConstructor
  19. @Api(tags = "文件导出-异步")
  20. @RestMappingController("export/async")
  21. public class ExportAsyncService {
  22. private final DeviceInfoServiceImpl deviceInfoService;
  23. @ApiOperation("导出设备信息")
  24. @PostMapping("deviceInfo")
  25. public R exportDeviceInfo(@RequestBody @Valid DeviceInfoDto.Page page) {
  26. deviceInfoService.exportDevicesAsync(page);
  27. return R.ok();
  28. }
  29. }