|
@@ -24,8 +24,8 @@ import cn.hobbystocks.auc.vo.LotVO;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
|
+import com.google.common.net.HttpHeaders;
|
|
|
|
|
+import io.swagger.annotations.*;
|
|
|
import org.apache.logging.log4j.util.Strings;
|
|
import org.apache.logging.log4j.util.Strings;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -188,6 +188,20 @@ public class LotController extends AdminBaseController {
|
|
|
|
|
|
|
|
@ApiOperation(value = "导出拍品列表信息", notes = "拍品列表信息\n", response = AjaxResult.class, responseContainer = "AjaxResult.success")
|
|
@ApiOperation(value = "导出拍品列表信息", notes = "拍品列表信息\n", response = AjaxResult.class, responseContainer = "AjaxResult.success")
|
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
|
|
|
+ @ApiResponses({
|
|
|
|
|
+ @ApiResponse(
|
|
|
|
|
+ code = 200,
|
|
|
|
|
+ message = "导出成功,返回Excel文件流",
|
|
|
|
|
+ responseHeaders = {
|
|
|
|
|
+ // 声明文件下载核心响应头
|
|
|
|
|
+ @ResponseHeader(name = HttpHeaders.CONTENT_TYPE, description = "文件类型:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),
|
|
|
|
|
+ @ResponseHeader(name = HttpHeaders.CONTENT_DISPOSITION, description = "文件下载头:attachment; filename=xxx.xlsx"),
|
|
|
|
|
+ @ResponseHeader(name = "Pragma", description = "禁用缓存"),
|
|
|
|
|
+ @ResponseHeader(name = "Cache-Control", description = "禁用缓存")
|
|
|
|
|
+ }
|
|
|
|
|
+ ),
|
|
|
|
|
+ @ApiResponse(code = 500, message = "导出失败,服务器异常")
|
|
|
|
|
+ })
|
|
|
public AjaxResult export(@RequestBody LotRequest request, HttpServletResponse response) {
|
|
public AjaxResult export(@RequestBody LotRequest request, HttpServletResponse response) {
|
|
|
|
|
|
|
|
List<LotExportDTO> lotList = lotService.exportLotList(request);
|
|
List<LotExportDTO> lotList = lotService.exportLotList(request);
|
|
@@ -196,13 +210,5 @@ public class LotController extends AdminBaseController {
|
|
|
return AjaxResult.success();
|
|
return AjaxResult.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @ApiOperation(value = "导出拍品列表信息2", notes = "拍品列表信息\n", response = AjaxResult.class, responseContainer = "AjaxResult.success")
|
|
|
|
|
- @PostMapping("/export2")
|
|
|
|
|
- public AjaxResult exportV2(@RequestBody LotRequest request) {
|
|
|
|
|
-
|
|
|
|
|
- List<LotExportDTO> lotList = lotService.exportLotList(request);
|
|
|
|
|
- return AjaxResult.successPage(lotList);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|