作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !3053
@@ -339,7 +339,7 @@ class GeoQuestionRes extends Command @@ -339,7 +339,7 @@ class GeoQuestionRes extends Command
339 $key = 'geo_task_list'; 339 $key = 'geo_task_list';
340 $task_id = Redis::rpop($key); 340 $task_id = Redis::rpop($key);
341 if(empty($task_id)){ 341 if(empty($task_id)){
342 - $project_ids = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN)->where('next_time', '<=', date('Y-m-d'))->orderBy('next_time', 'asc')->distinct()->pluck('project_id'); 342 + $project_ids = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN)->where('next_time', '<=', date('Y-m-d'))->orderBy('next_time', 'asc')->groupBy('project_id')->pluck('project_id');
343 if(!empty($project_ids)){ 343 if(!empty($project_ids)){
344 foreach ($project_ids as $project_id){ 344 foreach ($project_ids as $project_id){
345 $ids = GeoQuestion::where(['project_id' => $project_id, 'status' => GeoQuestion::STATUS_OPEN])->where('next_time', '<=', date('Y-m-d'))->pluck('id'); 345 $ids = GeoQuestion::where(['project_id' => $project_id, 'status' => GeoQuestion::STATUS_OPEN])->where('next_time', '<=', date('Y-m-d'))->pluck('id');