|
...
|
...
|
@@ -129,7 +129,7 @@ class InquiryMonthlyCount extends Command |
|
|
|
->where('updated_date','>=',$startTime->toDateString())
|
|
|
|
->where('updated_date','<=',$endTime->toDateString())
|
|
|
|
->orderByDesc('count')->limit(10)->get()->toArray();
|
|
|
|
if(!empty($data)){
|
|
|
|
if(!empty($arr['source'])){
|
|
|
|
$arr['source'] = json_encode($arr['source']);
|
|
|
|
}
|
|
|
|
//访问国家前15
|
|
...
|
...
|
@@ -139,6 +139,9 @@ class InquiryMonthlyCount extends Command |
|
|
|
->where('updated_date','>=',$startTime->toDateString())
|
|
|
|
->where('updated_date','<=',$endTime->toDateString())
|
|
|
|
->orderBy('ip','desc')->limit(15)->get()->toArray();
|
|
|
|
if(!empty($arr['source_country'])){
|
|
|
|
$arr['source_country'] = json_encode($arr['source_country']);
|
|
|
|
}
|
|
|
|
//受访界面前15
|
|
|
|
$arr['referrer_url'] = DB::table('gl_customer_visit_item')
|
|
|
|
->select('url',DB::raw('COUNT(*) as num'))
|
|
...
|
...
|
@@ -147,6 +150,9 @@ class InquiryMonthlyCount extends Command |
|
|
|
->where('updated_date','<=',$endTime->toDateString())
|
|
|
|
->groupBy('url')
|
|
|
|
->limit(15)->get()->toArray();
|
|
|
|
if(!empty($arr['referrer_url'])){
|
|
|
|
$arr['referrer_url'] = json_encode($arr['referrer_url']);
|
|
|
|
}
|
|
|
|
//访问断后
|
|
|
|
$arr['referrer_port'] = DB::table('gl_customer_visit_item')
|
|
|
|
->select('device_port',DB::raw('COUNT(*) as num'))
|
|
...
|
...
|
@@ -155,6 +161,9 @@ class InquiryMonthlyCount extends Command |
|
|
|
->where('updated_date','<=',$endTime->toDateString())
|
|
|
|
->groupBy('device_port')
|
|
|
|
->limit(15)->get()->toArray();
|
|
|
|
if(!empty($arr['referrer_port'])){
|
|
|
|
$arr['referrer_port'] = json_encode($arr['referrer_port']);
|
|
|
|
}
|
|
|
|
return $arr;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|