dyjh 6 年之前
父節點
當前提交
e988fb333a
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      app/Http/Controllers/Api/V1/AlbumController.php

+ 2 - 3
app/Http/Controllers/Api/V1/AlbumController.php

xqd xqd xqd
@@ -776,7 +776,6 @@ class AlbumController extends Controller
                 $val->action == 1? $act = '收藏':$act = '查看';
                 $action = $act.'了您的'.$cat->name.'分类下的'.$style->name.'风格的商品 '.$goods->name;
             }elseif($val->action == 2){
-
                 $cat_data = json_decode($val->detail,true);
                 if($cat_data['cat_id']=="undefined"||$cat_data['style']=="undefined"||!$cat_data['style']||!$cat_data['cat_id']) continue;
                 $cat = AlbumCatModel::find($cat_data['cat_id']);
@@ -1295,7 +1294,7 @@ class AlbumController extends Controller
             foreach($product as $key=>$val){
                 $check = AlbumProductPriceModel::where([['agent_id',$agent_id],['store_id',$data['store_id']],['product_id',$val['id']]])->first();
                 if(empty($check)){
-                    $save['agent_id'] = $data['agent_id'];
+                    $save['agent_id'] = $agent_id;
                     $save['store_id'] = $data['store_id'];
                     $save['product_id'] = $val['id'];
                     $res = AlbumProductPriceModel::create($save);
@@ -1322,7 +1321,7 @@ class AlbumController extends Controller
             $save['price'] = $data['price'];
             $check = AlbumProductPriceModel::where([['agent_id',$agent_id],['store_id',$data['store_id']],['product_id',$data['goods_id']]])->first();
             if(empty($check)){
-                $save['agent_id'] = $data['agent_id'];
+                $save['agent_id'] = $agent_id;
                 $save['store_id'] = $data['store_id'];
                 $save['product_id'] = $data['goods_id'];
                 $res = AlbumProductPriceModel::create($save);