|
...
|
...
|
@@ -41,14 +41,28 @@ class Yesterday extends Command |
|
|
|
$data = [];
|
|
|
|
$yesterday = Carbon::yesterday()->toDateString();
|
|
|
|
foreach ($list as $v){
|
|
|
|
$v['test_domain'] = 'https://demomark.globalso.com/';
|
|
|
|
$arr = [];
|
|
|
|
$arr['pv_num'] = DB::table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
|
|
$arr['ip_num'] = DB::table('gl_customer_visit')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
|
|
$inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain']);
|
|
|
|
$inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain'],'',1,100000000);
|
|
|
|
if($inquiry_list['status'] == self::STATUS_ERROR){
|
|
|
|
$arr['inquiry_num'] = 0;
|
|
|
|
}else{
|
|
|
|
$arr['inquiry_num'] = count($inquiry_list['data']['total']);
|
|
|
|
//询盘国家统计
|
|
|
|
$countryData = $list['data']['data'];
|
|
|
|
$countryArr = [];
|
|
|
|
foreach ($countryData as $v){
|
|
|
|
if(isset($arr[$v['country']])){
|
|
|
|
$countryArr[$v['country']]++;
|
|
|
|
}else{
|
|
|
|
$countryArr[$v['country']] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
arsort($countryArr);
|
|
|
|
$top20 = array_slice($arr, 0, 20, true);
|
|
|
|
$arr['country'] = json_encode($top20);
|
|
|
|
}
|
|
|
|
$arr['date'] = $yesterday;
|
|
|
|
$rank_info = DB::table('gl_rank_data')->where(['updated_date'=>$yesterday,'lang'=>''])->select(['compliance_day'])->first();
|
...
|
...
|
|