瀏覽代碼

Merge branch 'master' of http://git.9026.com/wesley/furniture

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

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

xqd
@@ -2245,10 +2245,10 @@ class AlbumController extends Controller
         $res = AlbumFavoriteModel::whereIn('user_id',$users)->where([['store_id',$store_id]])->groupBy('product_id')->get(['product_id'])->toArray();
         foreach($res as $key=>$val){
             $goods = AlbumProductModel::where([['id',$val['product_id']],['store_id',$store_id]])->get();
-            dd($goods);
             if(!$goods){
                 unset($res[$key]);continue;
             }
+            dd($res);
             $res[$key]['name'] = $goods->name;
             $res[$key]['count'] = AlbumFavoriteModel::whereIn('user_id',$users)->where([['store_id',$store_id],['product_id',$val['product_id']]])->count();
         }