作者 lyh

变更数据

... ... @@ -340,12 +340,11 @@ class GeoQuestionRes extends Command
$task_id = Redis::rpop($key);
if(empty($task_id)){
//todo::这里需要执行统计一次,统计当前项目当前日期的统计
# TODO 按照项目进行获取, 一个项目当天需要将所有跑完
$project_id = GeoQuestion::where('status', GeoQuestion::STATUS_OPEN)->where('next_time', '<=', date('Y-m-d'))->value('project_id');
if (!empty($project_id)){
$this->project_id = $project_id;
$ids = GeoQuestion::where(['project_id' => $project_id, 'status' => GeoQuestion::STATUS_OPEN])->where('current_time', '<>', date('Y-m-d'))->pluck('id');
$ids = GeoQuestion::where(['project_id' => $project_id, 'status' => GeoQuestion::STATUS_OPEN])->where('next_time', '<=', date('Y-m-d'))->pluck('id');
foreach ($ids as $id) {
Redis::lpush($key, $id);
}
... ...
... ... @@ -100,7 +100,13 @@ class LyhImportTest extends Command
if (file_exists($tempPath)) {
unlink($tempPath);
}
dd($rows);
//todo::处理数据
$productModel = new Product();
foreach ($rows as $row) {
dd($row);
$info = $productModel->read(['title'=>$row[0]]);
dd($row);
}
} catch (\Exception $e) {
// 输出更清晰的错误信息
echo '文件下载或解析失败:' . $e->getMessage() . PHP_EOL;
... ...