|
@@ -340,12 +340,11 @@ class GeoQuestionRes extends Command |
|
@@ -340,12 +340,11 @@ class GeoQuestionRes extends Command |
|
340
|
$task_id = Redis::rpop($key);
|
340
|
$task_id = Redis::rpop($key);
|
|
341
|
if(empty($task_id)){
|
341
|
if(empty($task_id)){
|
|
342
|
//todo::这里需要执行统计一次,统计当前项目当前日期的统计
|
342
|
//todo::这里需要执行统计一次,统计当前项目当前日期的统计
|
|
343
|
-
|
|
|
|
344
|
# TODO 按照项目进行获取, 一个项目当天需要将所有跑完
|
343
|
# TODO 按照项目进行获取, 一个项目当天需要将所有跑完
|
|
345
|
$project_id = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN)->where('next_time', '<=', date('Y-m-d'))->value('project_id');
|
344
|
$project_id = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN)->where('next_time', '<=', date('Y-m-d'))->value('project_id');
|
|
346
|
if (!empty($project_id)){
|
345
|
if (!empty($project_id)){
|
|
347
|
$this->project_id = $project_id;
|
346
|
$this->project_id = $project_id;
|
|
348
|
- $ids = GeoQuestion::where(['project_id' => $project_id, 'status' => GeoQuestion::STATUS_OPEN])->where('current_time', '<>', date('Y-m-d'))->pluck('id');
|
347
|
+ $ids = GeoQuestion::where(['project_id' => $project_id, 'status' => GeoQuestion::STATUS_OPEN])->where('next_time', '<=', date('Y-m-d'))->pluck('id');
|
|
349
|
foreach ($ids as $id) {
|
348
|
foreach ($ids as $id) {
|
|
350
|
Redis::lpush($key, $id);
|
349
|
Redis::lpush($key, $id);
|
|
351
|
}
|
350
|
}
|