| | |
| | | */ |
| | | @ApiOperation("导出列表") |
| | | @PostMapping("/export") |
| | | @ApiImplicitParam(name = "ids", value = "查询条件", required = true) |
| | | public void export(@RequestBody String query, HttpServletResponse response) { |
| | | // 验证输入是否为空或格式不正确 |
| | | if (StringUtils.isEmpty(query)) { |
| | | throw new ServiceException("查询条件不能为空"); |
| | | public void export(@RequestBody MgtAuctionSalesroomQuery query, HttpServletResponse response) { |
| | | PageDTO<MgtAuctionSalesroomVO> page = auctionSalesroomService.getAuctionSalesroomPage(query); |
| | | if (page.isEmpty()){ |
| | | return; |
| | | } |
| | | |
| | | JSONObject jsonObject = JSONObject.parseObject(query); |
| | | List<String> ids = jsonObject.getList("ids", String.class); |
| | | List<MgtAuctionSalesroomVO> list = page.getList(); |
| | | List<Long> ids = list.stream().map(MgtAuctionSalesroomVO::getId).collect(Collectors.toList()); |
| | | |
| | | // 验证ids是否为空 |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | throw new ServiceException("ids不能为空"); |
| | | } |
| | | |
| | | List<AuctionBidRecord> auctionBidRecordList = auctionBidRecordMapper.selectList( |
| | | new LambdaQueryWrapper<AuctionBidRecord>() |
| | |
| | | .map(AuctionBidRecord::getAuctionSalesroomId) |
| | | .collect(Collectors.toSet()); |
| | | |
| | | // 查询拍卖销售室商品信息 |
| | | // 查询拍卖场商品信息 |
| | | List<AuctionSalesroomGoods> salesroomGoodss = auctionSalesroomGoodsService.list( |
| | | new LambdaQueryWrapper<AuctionSalesroomGoods>() |
| | | .in(AuctionSalesroomGoods::getAuctionSalesroomId, auctionSalesroomIds) |