dyjh vor 6 Jahren
Ursprung
Commit
49752e9e7f
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      app/Http/Controllers/Api/V1/AlbumController.php

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

xqd xqd
@@ -518,7 +518,7 @@ class AlbumController extends Controller
             AlbumWatchRecord::create($add_record);
         }
         $goods = AlbumProductModel::where([['id',$goods_id],['store_id',$store_id]])->first();
-        if(!empty($goods) && $userAuth->up_agent_id != 0){
+        if(!empty($goods) && $userAuth->up_agent_id != 1){
             $price = DB::table('album_product_price')->where([['agent_id',$userAuth->up_agent_id],['store_id',$store_id],['product_id',$goods['id']]])->first();
             if(!empty($price)){
                 $goods->price = $price->price;
@@ -531,7 +531,7 @@ class AlbumController extends Controller
                 $goods->address = '';
             }
             $check_favorite = AlbumFavoriteModel::where([['user_id',$userAuth->id],['store_id',$store_id],['product_id',$goods['id']]])->first();
-            dd($check_favorite);
+            //dd($check_favorite);
             if($check_favorite){
                 $goods->is_favorite = 1;
                 $goods->favorite_id = $check_favorite->id;