Selaa lähdekoodia

去掉时间限制调试

duqinya 5 vuotta sitten
vanhempi
commit
3875e6affd
1 muutettua tiedostoa jossa 8 lisäystä ja 8 poistoa
  1. 8 8
      app/Repositories/BeanRepository.php

+ 8 - 8
app/Repositories/BeanRepository.php

@@ -172,8 +172,8 @@ class BeanRepository
 
             //昨日拉新最多前十人
             $registered_most = RegisteredRecord::
-                where('created_at', '>=',$time)
-                ->select(DB::raw('count(*) as count'),'superior_uid')
+//                where('created_at', '>=',$time)
+                select(DB::raw('count(*) as count'),'superior_uid')
                 ->groupBy('superior_uid')->orderBy('count','desc')->limit(10)->get();
             $registered_most = $registered_most->toArray();
 
@@ -225,15 +225,15 @@ class BeanRepository
             array_multisort($column,SORT_DESC,$all_best_author);
 
             $all_best_author = array_slice($all_best_author,0,10);
-            $related_content_id = array_column($all_best_author,'related_content_id');
-            $uids = implode(',', array_unique($related_content_id));
+            $content_author_id = array_column($all_best_author,'content_author_id');
+            $uids = implode(',', array_unique($content_author_id));
             $user_data = $this->getFollowMembersStatus($uids);
             if ($user_data){
                 foreach ($all_best_author as $k=>$v){
-                    if(!isset($user_data[$v['related_content_id']])) continue;
-                    $all_best_author[$k]['follow_status'] = $user_data[$v['related_content_id']]['follow_status'];
-                    $all_best_author[$k]['username'] = $user_data[$v['related_content_id']]['username'];
-                    $all_best_author[$k]['avatar'] = $user_data[$v['related_content_id']]['avatar'];
+                    if(!isset($user_data[$v['content_author_id']])) continue;
+                    $all_best_author[$k]['follow_status'] = $user_data[$v['content_author_id']]['follow_status'];
+                    $all_best_author[$k]['username'] = $user_data[$v['content_author_id']]['username'];
+                    $all_best_author[$k]['avatar'] = $user_data[$v['content_author_id']]['avatar'];
                 }
             }
             return $all_best_author;