...
|
...
|
@@ -128,7 +128,7 @@ class Buy extends Api |
|
|
|
|
|
$model = new \app\api\model\UserBuylist();
|
|
|
$order = $model->with('sku')->where('id',$id)->find();
|
|
|
if ($number+$order['number'] > $order['stock_num']) $this->error('已达到最大库存,请勿重复提交');
|
|
|
if ($number+$order['number'] > $order['sku']['stock_num']) $this->error('已达到最大库存,请勿重复提交');
|
|
|
$model->where('id',$id)->setInc('number',$number);
|
|
|
$this->success('SUCCESS');
|
|
|
}
|
...
|
...
|
|