...
|
...
|
@@ -120,8 +120,6 @@ class ShopCar extends Api |
|
|
$param = $this->request->param();
|
|
|
$product_id = Db::name('shopcar')->where(['id' => $param['shop_id']])->value('product_id');
|
|
|
$stock = Db::name('product')->where(['id' => $product_id])->value('stock');
|
|
|
dump($stock);
|
|
|
dump($product_id);
|
|
|
if ($param['num'] > $stock) {
|
|
|
$this->error('购买数量不能大于库存');
|
|
|
die;
|
...
|
...
|
|