fix:【MALL 商城】秒杀、积分商品库存剩余 1 时,无法下单
This commit is contained in:
@@ -300,7 +300,7 @@ public class PointActivityServiceImpl implements PointActivityService {
|
||||
throw exception(POINT_ACTIVITY_JOIN_ACTIVITY_SINGLE_LIMIT_COUNT_EXCEED);
|
||||
}
|
||||
// 2.2 校验库存是否充足
|
||||
if (count >= product.getStock()) {
|
||||
if (count > product.getStock()) {
|
||||
throw exception(POINT_ACTIVITY_UPDATE_STOCK_FAIL);
|
||||
}
|
||||
return BeanUtils.toBean(product, PointValidateJoinRespDTO.class);
|
||||
|
@@ -317,7 +317,7 @@ public class SeckillActivityServiceImpl implements SeckillActivityService {
|
||||
throw exception(SECKILL_JOIN_ACTIVITY_PRODUCT_NOT_EXISTS);
|
||||
}
|
||||
// 2.2 校验库存是否充足
|
||||
if (count >= product.getStock()) {
|
||||
if (count > product.getStock()) {
|
||||
throw exception(SECKILL_ACTIVITY_UPDATE_STOCK_FAIL);
|
||||
}
|
||||
return SeckillActivityConvert.INSTANCE.convert02(activity, product);
|
||||
|
Reference in New Issue
Block a user