|
@@ -41,14 +41,28 @@ class Yesterday extends Command |
|
@@ -41,14 +41,28 @@ class Yesterday extends Command |
|
41
|
$data = [];
|
41
|
$data = [];
|
|
42
|
$yesterday = Carbon::yesterday()->toDateString();
|
42
|
$yesterday = Carbon::yesterday()->toDateString();
|
|
43
|
foreach ($list as $v){
|
43
|
foreach ($list as $v){
|
|
|
|
44
|
+ $v['test_domain'] = 'https://demomark.globalso.com/';
|
|
44
|
$arr = [];
|
45
|
$arr = [];
|
|
45
|
$arr['pv_num'] = DB::table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
46
|
$arr['pv_num'] = DB::table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
46
|
$arr['ip_num'] = DB::table('gl_customer_visit')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
47
|
$arr['ip_num'] = DB::table('gl_customer_visit')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
47
|
- $inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain']);
|
48
|
+ $inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain'],'',1,100000000);
|
|
48
|
if($inquiry_list['status'] == self::STATUS_ERROR){
|
49
|
if($inquiry_list['status'] == self::STATUS_ERROR){
|
|
49
|
$arr['inquiry_num'] = 0;
|
50
|
$arr['inquiry_num'] = 0;
|
|
50
|
}else{
|
51
|
}else{
|
|
51
|
$arr['inquiry_num'] = count($inquiry_list['data']['total']);
|
52
|
$arr['inquiry_num'] = count($inquiry_list['data']['total']);
|
|
|
|
53
|
+ //询盘国家统计
|
|
|
|
54
|
+ $countryData = $list['data']['data'];
|
|
|
|
55
|
+ $countryArr = [];
|
|
|
|
56
|
+ foreach ($countryData as $v){
|
|
|
|
57
|
+ if(isset($arr[$v['country']])){
|
|
|
|
58
|
+ $countryArr[$v['country']]++;
|
|
|
|
59
|
+ }else{
|
|
|
|
60
|
+ $countryArr[$v['country']] = 0;
|
|
|
|
61
|
+ }
|
|
|
|
62
|
+ }
|
|
|
|
63
|
+ arsort($countryArr);
|
|
|
|
64
|
+ $top20 = array_slice($arr, 0, 20, true);
|
|
|
|
65
|
+ $arr['country'] = json_encode($top20);
|
|
52
|
}
|
66
|
}
|
|
53
|
$arr['date'] = $yesterday;
|
67
|
$arr['date'] = $yesterday;
|
|
54
|
$rank_info = DB::table('gl_rank_data')->where(['updated_date'=>$yesterday,'lang'=>''])->select(['compliance_day'])->first();
|
68
|
$rank_info = DB::table('gl_rank_data')->where(['updated_date'=>$yesterday,'lang'=>''])->select(['compliance_day'])->first();
|