Pu Zhibing
2025-01-17 cfc5730fe2d4e89cfd862028c5dc7c69ff0fd182
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/SeckillActivityInfoServiceImpl.java
@@ -227,7 +227,7 @@
        LocalDateTime endTime = seckillActivityInfo.getEndTime();
        long count = this.count(new LambdaQueryWrapper<SeckillActivityInfo>().eq(SeckillActivityInfo::getGoodId, goodId).eq(SeckillActivityInfo::getDelFlag, 0)
                .eq(SeckillActivityInfo::getIsShelves, 1).last(" and (" + startTime + " between start_time and end_time or " + endTime + " between start_time and end_time)"));
        if(0 < count){
        if(1 < count){
            throw new RuntimeException("该秒杀商品已在其他秒杀活动中存在");
        }
        this.baseMapper.updateById(seckillActivityInfo);