Commit 116d4bca authored by wuxiaoli's avatar wuxiaoli

收银系统

parent a8eebeec
...@@ -54,8 +54,6 @@ class CashierService { ...@@ -54,8 +54,6 @@ class CashierService {
} }
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
$goods = Goods::find($goods_id); $goods = Goods::find($goods_id);
if(!$goods){ if(!$goods){
throw new \Exception("商品不存在!", 1); throw new \Exception("商品不存在!", 1);
...@@ -84,6 +82,12 @@ class CashierService { ...@@ -84,6 +82,12 @@ class CashierService {
$cart->num = $cart->num + $request->input('num', 1); $cart->num = $cart->num + $request->input('num', 1);
} }
$cart->goods_id = $goods_id;
$cart->goods_sku_id = $goods_sku_id;
$cart->store_id = $goods->store_id;
$cart->save(); $cart->save();
return $cart; return $cart;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment