...
|
...
|
@@ -56,7 +56,7 @@ class Cart extends Api |
|
|
$spec_sku = new Litestoregoodsspec();
|
|
|
$spec_info = $spec_sku->where('goods_spec_id', $sku_id)->find();
|
|
|
if ($cart) {
|
|
|
if ( $number+ $cart['number'] > $spec_info['stock_num']) {
|
|
|
if ( $number > $spec_info['stock_num']) {
|
|
|
$this->error('库存不足');
|
|
|
}
|
|
|
$cart->setInc('number', $number);
|
...
|
...
|
|