|
@@ -113,8 +113,8 @@ class OrderService extends BaseService {
|
|
|
*/
|
|
|
public function getGoods()
|
|
|
{
|
|
|
+ $goods=$this->goods;
|
|
|
if($this->frm==1) {
|
|
|
- $goods=$this->goods;
|
|
|
$newGoods=[];
|
|
|
foreach ($goods as $sku_id=>$info){
|
|
|
$sku=GoodsSku::with(['goods'])->find($sku_id);
|
|
@@ -140,6 +140,12 @@ class OrderService extends BaseService {
|
|
|
$map['goods_sku_id']=['in',$this->cartSkuIds];
|
|
|
}
|
|
|
}
|
|
|
+ foreach ($this->goods as $skuId=>$numArr){
|
|
|
+ $this->getUser()->cart()->where('goods_sku_id',$skuId)->update([
|
|
|
+ 'num'=>$numArr['num'],
|
|
|
+ 'num_install'=>$numArr['num_install'],
|
|
|
+ ]);
|
|
|
+ }
|
|
|
return $this->getUser()->cart()
|
|
|
->where($map)
|
|
|
->with(['goods','sku'])
|