【缺陷修复】商城:活动的库存校验,从 > 改成 >=
This commit is contained in:
parent
8d4cc35cde
commit
d97ba8d4d8
|
@ -131,7 +131,7 @@ public class CombinationRecordServiceImpl implements CombinationRecordService {
|
|||
throw exception(COMBINATION_JOIN_ACTIVITY_PRODUCT_NOT_EXISTS);
|
||||
}
|
||||
// 4.3 校验库存是否充足
|
||||
if (count > sku.getStock()) {
|
||||
if (count >= sku.getStock()) {
|
||||
throw exception(COMBINATION_ACTIVITY_UPDATE_STOCK_FAIL);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue