Commit c8cf97f6 authored by macro's avatar macro
Browse files

下单库存问题修复

parent 0a6717f3
......@@ -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;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment