| | |
| | | public String getQrCode(Long id) throws Exception { |
| | | AuctionSalesroom auctionSalesroom = this.getById(id); |
| | | String auctionSalesroomNo = auctionSalesroom.getAuctionSalesroomNo(); |
| | | return CreateQrCode.createQRCode(auctionSalesroomNo); |
| | | return auctionSalesroom.getQrCode(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | if (lastBidAmount.intValue() > 0) { |
| | | BigDecimal divide = lastBidAmount.divide( |
| | | BigDecimal.valueOf(Long.parseLong(memberPointsMoney.getConfigValue())), 0, |
| | | new BigDecimal(memberPointsMoney.getConfigValue()), 0, |
| | | RoundingMode.DOWN); |
| | | int points = divide.multiply( |
| | | BigDecimal.valueOf( |
| | | Long.parseLong((memberPointsPoints.getConfigValue())))).intValue(); |
| | | new BigDecimal(memberPointsPoints.getConfigValue())).intValue(); |
| | | order.setPoints(points); |
| | | } else { |
| | | order.setPoints(0); |
| | |
| | | List<GoodsStockUpdDTO> dtoList = new ArrayList<>(); |
| | | for (AuctionSalesroomGoods salesroomGoods : auctionSalesroomGoods) { |
| | | salesroomGoods.setStatus(AuctionGoodsStatusEnum.ENDED); |
| | | GoodsStockUpdDTO goodsStockUpdDTO = new GoodsStockUpdDTO(); |
| | | goodsStockUpdDTO.setGoodsSkuId(salesroomGoods.getGoodsSkuId()); |
| | | goodsStockUpdDTO.setAuctionStock(salesroomGoods.getSalesroomStock()); |
| | | dtoList.add(goodsStockUpdDTO); |
| | | // 等待中的商品退库存 |
| | | if (salesroomGoods.getStatus().equals(AuctionGoodsStatusEnum.WAITING)) { |
| | | GoodsStockUpdDTO goodsStockUpdDTO = new GoodsStockUpdDTO(); |
| | | goodsStockUpdDTO.setGoodsSkuId(salesroomGoods.getGoodsSkuId()); |
| | | goodsStockUpdDTO.setAuctionStock(salesroomGoods.getSalesroomStock()); |
| | | dtoList.add(goodsStockUpdDTO); |
| | | } |
| | | |
| | | } |
| | | // 批量更新商品库存 |
| | | auctionSalesroomGoodsMapper.updateBatchById(auctionSalesroomGoods); |
| | |
| | | List<AuctionBidRecord> auctionBidRecordList = auctionBidRecordMapper.selectList( |
| | | Wrappers.<AuctionBidRecord>lambdaQuery() |
| | | .eq(AuctionBidRecord::getAuctionSalesroomId, auctionSalesroomId) |
| | | .eq(AuctionBidRecord::getStatus, BidStatusEnum.ELIMINATE)); |
| | | Set<Long> memberIdlist = auctionBidRecordList.stream().map(AuctionBidRecord::getMemberId) |
| | | .collect(Collectors.toSet()); |
| | | if (StringUtils.isNotEmpty(memberIdlist)) { |
| | | OrderAuctionBondDTO orderAuctionBondDTO = new OrderAuctionBondDTO(); |
| | | orderAuctionBondDTO.setAuctionSalesroomId(auctionSalesroom.getId()); |
| | | orderAuctionBondDTO.setUserList(memberIdlist); |
| | | orderClient.getOrderAuctionBond(orderAuctionBondDTO, SecurityConstants.INNER); |
| | | .ne(AuctionBidRecord::getStatus, BidStatusEnum.SUCCESSFUL)); |
| | | Set<Long> memberIdList = new HashSet<>(); |
| | | if (CollUtils.isNotEmpty(auctionBidRecordList)) { |
| | | memberIdList = auctionBidRecordList.stream().map(AuctionBidRecord::getMemberId) |
| | | .collect(Collectors.toSet()); |
| | | } |
| | | OrderAuctionBondDTO orderAuctionBondDTO = new OrderAuctionBondDTO(); |
| | | orderAuctionBondDTO.setAuctionSalesroomId(auctionSalesroom.getId()); |
| | | orderAuctionBondDTO.setUserList(memberIdList); |
| | | orderClient.getOrderAuctionBond(orderAuctionBondDTO, SecurityConstants.INNER); |
| | | Map<String, Object> map = new ConcurrentHashMap<>(); |
| | | map.put("notification_type", NotificationTypeConstant.AUCTION_SALESROOM); |
| | | map.put("auctionSalesroomId", auctionSalesroom.getId().toString()); |