作者 lyh

变更数据

@@ -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 }
@@ -100,7 +100,13 @@ class LyhImportTest extends Command @@ -100,7 +100,13 @@ class LyhImportTest extends Command
100 if (file_exists($tempPath)) { 100 if (file_exists($tempPath)) {
101 unlink($tempPath); 101 unlink($tempPath);
102 } 102 }
103 - dd($rows); 103 + //todo::处理数据
  104 + $productModel = new Product();
  105 + foreach ($rows as $row) {
  106 + dd($row);
  107 + $info = $productModel->read(['title'=>$row[0]]);
  108 + dd($row);
  109 + }
104 } catch (\Exception $e) { 110 } catch (\Exception $e) {
105 // 输出更清晰的错误信息 111 // 输出更清晰的错误信息
106 echo '文件下载或解析失败:' . $e->getMessage() . PHP_EOL; 112 echo '文件下载或解析失败:' . $e->getMessage() . PHP_EOL;