duqinya %!s(int64=5) %!d(string=hai) anos
pai
achega
eb9ba3fff5
Modificáronse 2 ficheiros con 9 adicións e 8 borrados
  1. 4 7
      app/Console/Commands/RankingList.php
  2. 5 1
      app/Console/Kernel.php

+ 4 - 7
app/Console/Commands/RankingList.php

@@ -101,13 +101,10 @@ class RankingList extends Command
             $release_best_author[$k]['type'] = 'release';
         }
         $all_best_author = array_merge($comment_best_author,$general_best_author,$release_best_author);
-        $arr_sort = array();
-        foreach($all_best_author as $key => $value){
-            foreach($value as $k=>$v){
-                $arr_sort[$k][$key] = $v;
-            }
-        }
-        array_multisort($arr_sort['generation_quantity'], SORT_DESC, $all_best_author);
+
+        $column = array_column($all_best_author,'generation_quantity');
+        array_multisort($column,SORT_DESC,$all_best_author);
+
         $all_best_author = array_slice($all_best_author,0,10);
 
         Log::debug('昨日拉新最多前十人'.json_encode($registered_most));

+ 5 - 1
app/Console/Kernel.php

@@ -6,6 +6,8 @@ use App\Console\Commands\Apollo;
 use App\Console\Commands\BehaviorRecord;
 use App\Console\Commands\CalcPostWeight;
 use App\Console\Commands\ContentFeedCreate;
+use App\Console\Commands\ExcellentResidents;
+use App\Console\Commands\RankingList;
 use Illuminate\Console\Scheduling\Schedule;
 use Laravel\Lumen\Console\Kernel as ConsoleKernel;
 
@@ -20,7 +22,9 @@ class Kernel extends ConsoleKernel
         Apollo::class,
         BehaviorRecord::class,
         CalcPostWeight::class,
-        ContentFeedCreate::class
+        ContentFeedCreate::class,
+        ExcellentResidents::class,
+        RankingList::class
     ];
 
     /**