mitao
2024-09-21 f44e4d609e7efaed9eac545137970b1e334f8106
ruoyi-modules/ruoyi-auction/src/main/java/com/ruoyi/auction/service/impl/AuctionSalesroomServiceImpl.java
@@ -467,8 +467,17 @@
        memberAuctionSalesroomInfoVO.setEndTime(byId.getEndTime());
        memberAuctionSalesroomInfoVO.setType(byId.getType());
        memberAuctionSalesroomInfoVO.setDescription(byId.getDescription());
        memberAuctionSalesroomInfoVO.setSharePic(byId.getSharePic());
        memberAuctionSalesroomInfoVO.setShareTitle(byId.getShareTitle());
        if (StringUtils.isNotBlank(byId.getShareTitle())) {
            memberAuctionSalesroomInfoVO.setShareTitle(byId.getShareTitle());
        } else {
            memberAuctionSalesroomInfoVO.setShareTitle(byId.getSalesroomName());
        }
        if (StringUtils.isNotBlank(byId.getSharePic())) {
            memberAuctionSalesroomInfoVO.setSharePic(byId.getSharePic());
        } else {
            memberAuctionSalesroomInfoVO.setSharePic(byId.getCoverPic());
        }
        memberAuctionSalesroomInfoVO.setStartTime(byId.getStartTime());
        memberAuctionSalesroomInfoVO.setStatus(byId.getStatus());
        memberAuctionSalesroomInfoVO.setCoverPic(byId.getCoverPic());
@@ -1583,6 +1592,7 @@
        order.setSkuName(goodsSku.getSkuName());
        order.setCoverPic(goodsSku.getCoverPic());
        order.setPrice(lastBidAmount);
        order.setGoodsId(auctionSalesroomGoods.getGoodsSkuId());
        orderClient.saveOrderOne(order, SecurityConstants.INNER);
    }
    /**
@@ -1674,8 +1684,7 @@
        map.put("message_type", "start");
        map.put("type", "1");
        String msg = objectMapper.writeValueAsString(map);
        sysUserClient.pushByClientType(WebsocketMessageDTO.builder().message(msg)
                .clientType(ClientTypeEnum.AUCTIONEER).build(), SecurityConstants.INNER);
        sysUserClient.pushAll(msg, SecurityConstants.INNER);
    }
    @Override
@@ -1738,8 +1747,7 @@
        map.put("message_type", "end");
        map.put("type", "1");
        String msg = objectMapper.writeValueAsString(map);
        sysUserClient.pushByClientType(WebsocketMessageDTO.builder().message(msg)
                .clientType(ClientTypeEnum.AUCTIONEER).build(), SecurityConstants.INNER);
        sysUserClient.pushAll(msg, SecurityConstants.INNER);
    }
    @Override
@@ -1791,4 +1799,15 @@
                        .eq(AuctionBondJl::getBondType, bondType)
                        .last("limit 1"));
    }
    @Override
    public List<GoodsSku> getGoodsSkuByAuctionSalesroomGoodsSet(
            Set<Long> auctionSalesroomGoodsSet) {
        List<AuctionSalesroomGoods> auctionSalesroomGoodsList = auctionSalesroomGoodsMapper.selectBatchIds(
                auctionSalesroomGoodsSet);
        Set<Long> goodsSkuIdSet = auctionSalesroomGoodsList.stream()
                .map(AuctionSalesroomGoods::getGoodsSkuId).collect(
                        Collectors.toSet());
        return goodsSkuClient.getGoodsListByIds(goodsSkuIdSet, SecurityConstants.INNER).getData();
    }
}