作者 王智

222

... ... @@ -133,6 +133,7 @@ class ShopCar extends Api
if ($param['num'] > $stock) {
Db::name('shopcar')->where(['user_id' => $user_id])->where(['id' => $param['shop_id']])->update(['buy_num' => $stock]);
} else {
echo '1';
Db::name('shopcar')->where(['user_id' => $user_id])->where(['id' => $param['shop_id']])->update(['buy_num' => $param['num']]);
}
}
... ...