|
...
|
...
|
@@ -120,24 +120,24 @@ class MonthCountLogic extends BaseLogic |
|
|
|
$source = DB::table('gl_customer_visit')
|
|
|
|
->select('referrer_url', DB::raw('COUNT(*) as count'))
|
|
|
|
->groupBy('referrer_url')->where(['domain'=>$domain])
|
|
|
|
->where('updated_date','>=',$startTime)
|
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
// ->where('updated_date','>=',$startTime)
|
|
|
|
// ->where('updated_date','<=',$endTime)
|
|
|
|
->orderByDesc('count')->limit(10)->get()->toArray();
|
|
|
|
$arr['source'] = $source;
|
|
|
|
//访问国家前15
|
|
|
|
$source_country = DB::table('gl_customer_visit')
|
|
|
|
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
|
|
|
|
->groupBy('country')->where(['domain'=>$domain])
|
|
|
|
->where('updated_date','>=',$startTime)
|
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
// ->where('updated_date','>=',$startTime)
|
|
|
|
// ->where('updated_date','<=',$endTime)
|
|
|
|
->orderBy('ip','desc')->limit(15)->get()->toArray();
|
|
|
|
$arr['source_country'] = $source_country;
|
|
|
|
//受访界面前15
|
|
|
|
$referrer_url = DB::table('gl_customer_visit_item')
|
|
|
|
->select('url',DB::raw('COUNT(*) as num'))
|
|
|
|
->orderBy('num','desc')->where(['domain'=>$domain])
|
|
|
|
->where('updated_date','>=',$startTime)
|
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
// ->where('updated_date','>=',$startTime)
|
|
|
|
// ->where('updated_date','<=',$endTime)
|
|
|
|
->groupBy('url')
|
|
|
|
->limit(15)->get()->toArray();
|
|
|
|
$arr['referrer_url'] = $referrer_url;
|
|
...
|
...
|
@@ -145,8 +145,8 @@ class MonthCountLogic extends BaseLogic |
|
|
|
$referrer_port = DB::table('gl_customer_visit_item')
|
|
|
|
->select('device_port',DB::raw('COUNT(*) as num'))
|
|
|
|
->orderBy('num','desc')->where(['domain'=>$domain])
|
|
|
|
->where('updated_date','>=',$startTime)
|
|
|
|
->where('updated_date','<=',$endTime)
|
|
|
|
// ->where('updated_date','>=',$startTime)
|
|
|
|
// ->where('updated_date','<=',$endTime)
|
|
|
|
->groupBy('device_port')
|
|
|
|
->limit(15)->get()->toArray();
|
|
|
|
$arr['referrer_port'] = $referrer_port;
|
...
|
...
|
|