|
...
|
...
|
@@ -339,12 +339,8 @@ class GeoQuestionRes extends Command |
|
|
|
$key = 'geo_task_list';
|
|
|
|
$task_id = Redis::rpop($key);
|
|
|
|
if(empty($task_id)){
|
|
|
|
$project_ids = GeoQuestion::select('project_id', DB::raw('MIN(next_time) as min_time'))
|
|
|
|
->where('status', GeoQuestion::STATUS_OPEN)
|
|
|
|
->where('next_time', '<=', date('Y-m-d'))
|
|
|
|
->groupBy('project_id')
|
|
|
|
->orderBy('min_time', 'asc')
|
|
|
|
->pluck('project_id');
|
|
|
|
$project_ids = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN)->where('next_time', '<=', date('Y-m-d'))
|
|
|
|
->orderBy('next_time', 'asc')->pluck('project_id')->unique()->values()->toArray();
|
|
|
|
if(!empty($project_ids)){
|
|
|
|
foreach ($project_ids as $project_id){
|
|
|
|
$ids = GeoQuestion::where(['project_id' => $project_id, 'status' => GeoQuestion::STATUS_OPEN])->where('next_time', '<=', date('Y-m-d'))->pluck('id');
|
...
|
...
|
|