mitao
2025-03-06 01d6fa48a0de7a21988e89f71721b6b85e53b517
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsSeckillServiceImpl.java
@@ -476,6 +476,16 @@
        homeGoodsSeckillInfoVO.setCoverPic(data6.getCoverPic());
        homeGoodsSeckillInfoVO.setAlbum(data6.getAlbum());
        homeGoodsSeckillInfoVO.setShareTitle(byId.getShareTitle());
        if (StringUtils.isNotBlank(byId.getShareTitle())) {
            homeGoodsSeckillInfoVO.setShareTitle(byId.getShareTitle());
        } else {
            homeGoodsSeckillInfoVO.setShareTitle(data6.getSkuName());
        }
        if (StringUtils.isNotBlank(byId.getSharePic())) {
            homeGoodsSeckillInfoVO.setSharePic(byId.getSharePic());
        } else {
            homeGoodsSeckillInfoVO.setSharePic(data6.getCoverPic());
        }
        homeGoodsSeckillInfoVO.setSeckillPrice(byId.getSeckillPrice());
        homeGoodsSeckillInfoVO.setDescription(data6.getDescription());
        homeGoodsSeckillInfoVO.setDetail(data6.getDetail());
@@ -512,4 +522,26 @@
        return homeGoodsSeckillInfoVO;
    }
    /**
     * 结束异常的秒杀
     */
    @Override
    public void updSeckillStatus() {
        baseMapper.updSeckillStatus();
    }
    /**
     * 根据秒杀id集合查询商品sku信息
     *
     * @param seckillIdSet
     * @return
     */
    @Override
    public List<GoodsSku> getGoodsSkuBySeckillIdSet(Set<Long> seckillIdSet) {
        List<GoodsSeckill> goodsSeckills = this.listByIds(seckillIdSet);
        List<Long> goodsSkuIdList = goodsSeckills.stream().map(GoodsSeckill::getGoodsSkuId)
                .collect(Collectors.toList());
        return goodsSkuService.listByIds(goodsSkuIdList);
    }
}