正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -137,21 +137,21 @@ class MonthCountLogic extends BaseLogic | @@ -137,21 +137,21 @@ class MonthCountLogic extends BaseLogic | ||
| 137 | //访问来源前10 | 137 | //访问来源前10 |
| 138 | $source = DB::connection('custom_mysql')->table('gl_customer_visit') | 138 | $source = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 139 | ->select('referrer_url', DB::raw('COUNT(*) as count')) | 139 | ->select('referrer_url', DB::raw('COUNT(*) as count')) |
| 140 | - ->groupBy('referrer_url')->where(['domain'=>$domain]) | 140 | + ->groupBy('referrer_url') |
| 141 | ->whereBetween('updated_date', [$startTime,$endTime]) | 141 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 142 | ->orderByDesc('count')->limit(10)->get()->toArray(); | 142 | ->orderByDesc('count')->limit(10)->get()->toArray(); |
| 143 | $arr['source'] = $source; | 143 | $arr['source'] = $source; |
| 144 | //访问国家前15 | 144 | //访问国家前15 |
| 145 | $source_country = DB::connection('custom_mysql')->table('gl_customer_visit') | 145 | $source_country = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 146 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | 146 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) |
| 147 | - ->groupBy('country')->where(['domain'=>$domain]) | 147 | + ->groupBy('country') |
| 148 | ->whereBetween('updated_date', [$startTime,$endTime]) | 148 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 149 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); | 149 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); |
| 150 | $arr['source_country'] = $source_country; | 150 | $arr['source_country'] = $source_country; |
| 151 | //受访界面前15 | 151 | //受访界面前15 |
| 152 | $referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit') | 152 | $referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 153 | ->select('url',DB::raw('COUNT(*) as num')) | 153 | ->select('url',DB::raw('COUNT(*) as num')) |
| 154 | - ->orderBy('num','desc')->where(['domain'=>$domain]) | 154 | + ->orderBy('num','desc') |
| 155 | ->whereBetween('updated_date', [$startTime,$endTime]) | 155 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 156 | ->groupBy('url') | 156 | ->groupBy('url') |
| 157 | ->limit(15)->get()->toArray(); | 157 | ->limit(15)->get()->toArray(); |
| @@ -159,7 +159,7 @@ class MonthCountLogic extends BaseLogic | @@ -159,7 +159,7 @@ class MonthCountLogic extends BaseLogic | ||
| 159 | //访问断后 | 159 | //访问断后 |
| 160 | $referrer_port = DB::connection('custom_mysql')->table('gl_customer_visit') | 160 | $referrer_port = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 161 | ->select('device_port',DB::raw('COUNT(*) as num')) | 161 | ->select('device_port',DB::raw('COUNT(*) as num')) |
| 162 | - ->orderBy('num','desc')->where(['domain'=>$domain]) | 162 | + ->orderBy('num','desc') |
| 163 | ->whereBetween('updated_date', [$startTime,$endTime]) | 163 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 164 | ->groupBy('device_port') | 164 | ->groupBy('device_port') |
| 165 | ->limit(15)->get()->toArray(); | 165 | ->limit(15)->get()->toArray(); |
-
请 注册 或 登录 后发表评论