|
...
|
...
|
@@ -155,19 +155,14 @@ class MonthCountLogic extends BaseLogic |
|
|
|
->orderByDesc('count')->limit(10)->get()->toArray();
|
|
|
|
$arr['source'] = $source;
|
|
|
|
//访问国家前15
|
|
|
|
$source_country = DB::connection('custom_mysql')->table('gl_customer_visit')
|
|
|
|
$query = DB::connection('custom_mysql')->table('gl_customer_visit')
|
|
|
|
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
|
|
|
|
->groupBy('country')
|
|
|
|
->whereBetween('updated_date', [$startTime,$endTime])
|
|
|
|
->orderBy('ip','desc')->limit(15)->get()->toArray();
|
|
|
|
->groupBy('country');
|
|
|
|
if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){
|
|
|
|
foreach ($source_country as $k => $v){
|
|
|
|
$v = (array)$v;
|
|
|
|
if($v['country'] == '中国'){
|
|
|
|
unset($source_country[$k]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$query->where('country','<>','中国');
|
|
|
|
}
|
|
|
|
$source_country = $query->whereBetween('updated_date', [$startTime,$endTime])
|
|
|
|
->orderBy('ip','desc')->limit(15)->get()->toArray();
|
|
|
|
$arr['source_country'] = $source_country;
|
|
|
|
//受访界面前15
|
|
|
|
$referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit')
|
...
|
...
|
|