dyjh 6 yıl önce
ebeveyn
işleme
ce74798c47

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

xqd xqd
@@ -2407,6 +2407,11 @@ class AlbumController extends Controller
             $goods = AlbumProductModel::where([['id',$goods_id]])->first();
             if($goods){
                 $cat = AlbumCatModel::where([['store_id',$store_id],['id',$goods->cat_id]])->first();
+
+                if (!$cat) {
+                    continue;
+                }
+
                 if (isset($arr[date('Y-m-d H:i', strtotime($val['created_at']))])) {
                     if (isset($arr[date('Y-m-d H:i', strtotime($val['created_at']))][$goods->id])) {
                         $arr[date('Y-m-d H:i', strtotime($val['created_at']))][$goods->id]['times']++;
@@ -2432,7 +2437,7 @@ class AlbumController extends Controller
             }
 
             krsort($arr);
-        }dd(111);
+        }
         return $this->api($arr,0,'success');
     }