正在显示
1 个修改的文件
包含
4 行增加
和
5 行删除
| @@ -354,17 +354,16 @@ class GeoQuestionRes extends Command | @@ -354,17 +354,16 @@ class GeoQuestionRes extends Command | ||
| 354 | if (empty($lock)){ | 354 | if (empty($lock)){ |
| 355 | return $task_id; | 355 | return $task_id; |
| 356 | } | 356 | } |
| 357 | - $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(); | 357 | + $project_ids = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN)->where('next_time', '<=', date('Y-m-d'))->pluck('project_id')->unique()->values()->toArray(); |
| 358 | if(FALSE == empty($project_ids)){ | 358 | if(FALSE == empty($project_ids)){ |
| 359 | $ids = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN) | 359 | $ids = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN) |
| 360 | ->whereIn('project_id', $project_ids) | 360 | ->whereIn('project_id', $project_ids) |
| 361 | ->where(function ($query){ | 361 | ->where(function ($query){ |
| 362 | - $query->where('current_time', '!=', date('Y-m-d')) | ||
| 363 | - ->orWhereNull('current_time'); | 362 | + $query->where('next_time', '<=', date('Y-m-d')) |
| 363 | + ->orWhereNull('next_time'); | ||
| 364 | }) | 364 | }) |
| 365 | - ->orderBy('project_id', 'asc') | 365 | + ->orderBy('next_time', 'asc') |
| 366 | ->pluck('id'); | 366 | ->pluck('id'); |
| 367 | - | ||
| 368 | foreach ($ids as $id) { | 367 | foreach ($ids as $id) { |
| 369 | Redis::lpush($key, $id); | 368 | Redis::lpush($key, $id); |
| 370 | } | 369 | } |
-
请 注册 或 登录 后发表评论