Commit fb6771aad0425df1cd23245a6001929de046e23d
1 parent
3aac40a5
fix:【MALL 商城】秒杀时间段的校验
Showing
1 changed file
with
3 additions
and
1 deletions
yudao-module-mall/yudao-module-promotion/src/main/java/cn/iocoder/yudao/module/promotion/service/seckill/SeckillActivityServiceImpl.java
| ... | ... | @@ -303,7 +303,9 @@ public class SeckillActivityServiceImpl implements SeckillActivityService { |
| 303 | 303 | throw exception(SECKILL_JOIN_ACTIVITY_TIME_ERROR); |
| 304 | 304 | } |
| 305 | 305 | SeckillConfigDO config = seckillConfigService.getCurrentSeckillConfig(); |
| 306 | - if (config == null || !CollectionUtil.contains(activity.getConfigIds(), config.getId())) { | |
| 306 | + if (config == null | |
| 307 | + || !CollectionUtil.contains(activity.getConfigIds(), config.getId()) | |
| 308 | + || !LocalDateTimeUtils.isBetween(config.getStartTime(), config.getEndTime())) { | |
| 307 | 309 | throw exception(SECKILL_JOIN_ACTIVITY_TIME_ERROR); |
| 308 | 310 | } |
| 309 | 311 | // 1.3 超过单次购买限制 | ... | ... |