【同步】BOOT 和 CLOUD 的功能
(cherry picked from commit 5b816120860fa13ee7e0e4515d605cf1f015ffbf)
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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