Commit aaf7e6f8 by 杨昕

去掉排序

parent 4121d91e
Pipeline #10790 passed with stages
in 41 seconds
......@@ -92,16 +92,15 @@ class MediaModel extends Eloquent
$aggregate[]['$match']['end_time'] = ['$lt' => $end_time ];
}
$aggregate[]['$sort'] = ['start_time' => $sort];
$aggregate1 = $aggregate;
$aggregate1=$aggregate;
$aggregate[]['$sort'] = ['start_time' => $sort];
$aggregate1[]['$group'] = [
'_id' => array(),//更具性别进行分组
'count'=>array('$sum'=>1)
];
$count = $collection->aggregate($aggregate1)->toArray();
if (isset($count[0])){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment