|
...
|
...
|
@@ -86,7 +86,14 @@ class Count extends Command |
|
|
|
if($arr === false){
|
|
|
|
$data[] = $v['test_domain'];
|
|
|
|
}
|
|
|
|
DB::table('gl_count')->insert($arr);
|
|
|
|
//查询当天数据是否存在 存在则更新
|
|
|
|
$countModel = new \App\Models\HomeCount\Count();
|
|
|
|
$info = $countModel->read(['date'=>$arr['date'],'project_id'=>$v['id']]);
|
|
|
|
if($info === false){
|
|
|
|
DB::table('gl_count')->insert($arr);
|
|
|
|
}else{
|
|
|
|
$countModel->edit($arr,['id'=>$info['id']]);
|
|
|
|
}
|
|
|
|
Log::channel('day_count')->error('日期:'.$arr['created_at'].'success: ' .$v['test_domain']);
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|