...
|
...
|
@@ -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; //库存不足
|
|
|
}
|
|
|
}
|
|
|
} |
...
|
...
|
|