|
@@ -716,7 +716,10 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|
|
*/
|
|
|
private boolean hasStock(List<CartPromotionItem> cartPromotionItemList) {
|
|
|
for (CartPromotionItem cartPromotionItem : cartPromotionItemList) {
|
|
|
- if (cartPromotionItem.getRealStock()==null||cartPromotionItem.getRealStock() <= 0) {
|
|
|
+ if (cartPromotionItem.getRealStock()==null //判断真实库存是否为空
|
|
|
+ ||cartPromotionItem.getRealStock() <= 0 //判断真实库存是否小于0
|
|
|
+ || cartPromotionItem.getRealStock() < cartPromotionItem.getQuantity()) //判断真实库存是否小于下单的数量
|
|
|
+ {
|
|
|
return false;
|
|
|
}
|
|
|
}
|