作者 耿培杰

修改订单付款接口

... ... @@ -283,9 +283,9 @@ class Goods extends Model
->where('type','1')
->sum('stock_num');
if($number < $sum_stock_num){
return false; //库存不足
}else{
return true;
}else{
return false; //库存不足
}
}
}
... ...
... ... @@ -154,13 +154,10 @@ class IntegralGoods extends Model
->where(['goods_id' => $goodsId])
->where('type','2')
->sum('stock_num');
var_dump($number);
var_dump($sum_stock_num);
halt($number < $sum_stock_num);
if($number < $sum_stock_num){
return false; //库存不足
}else{
return true;
}else{
return false; //库存不足
}
}
}
... ...