正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -159,21 +159,21 @@ class InquiryMonthlyCount extends Command | @@ -159,21 +159,21 @@ class InquiryMonthlyCount extends Command | ||
| 159 | //访问来源前10 | 159 | //访问来源前10 |
| 160 | $source = DB::connection('custom_mysql')->table('gl_customer_visit') | 160 | $source = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 161 | ->select('referrer_url', DB::raw('COUNT(*) as count')) | 161 | ->select('referrer_url', DB::raw('COUNT(*) as count')) |
| 162 | - ->groupBy('referrer_url')->where(['domain'=>$domain]) | 162 | + ->groupBy('referrer_url') |
| 163 | ->whereBetween('updated_date', [$startTime,$endTime]) | 163 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 164 | ->orderByDesc('count')->limit(10)->get()->toArray(); | 164 | ->orderByDesc('count')->limit(10)->get()->toArray(); |
| 165 | $arr['source'] = json_encode($source); | 165 | $arr['source'] = json_encode($source); |
| 166 | //访问国家前15 | 166 | //访问国家前15 |
| 167 | $source_country = DB::connection('custom_mysql')->table('gl_customer_visit') | 167 | $source_country = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 168 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | 168 | ->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) |
| 169 | - ->groupBy('country')->where(['domain'=>$domain]) | 169 | + ->groupBy('country') |
| 170 | ->whereBetween('updated_date', [$startTime,$endTime]) | 170 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 171 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); | 171 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); |
| 172 | $arr['source_country'] = json_encode($source_country); | 172 | $arr['source_country'] = json_encode($source_country); |
| 173 | //受访界面前15 | 173 | //受访界面前15 |
| 174 | $referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit') | 174 | $referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 175 | ->select('url',DB::raw('COUNT(*) as num')) | 175 | ->select('url',DB::raw('COUNT(*) as num')) |
| 176 | - ->orderBy('num','desc')->where(['domain'=>$domain]) | 176 | + ->orderBy('num','desc') |
| 177 | ->whereBetween('updated_date', [$startTime,$endTime]) | 177 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 178 | ->groupBy('url') | 178 | ->groupBy('url') |
| 179 | ->limit(15)->get()->toArray(); | 179 | ->limit(15)->get()->toArray(); |
| @@ -181,7 +181,7 @@ class InquiryMonthlyCount extends Command | @@ -181,7 +181,7 @@ class InquiryMonthlyCount extends Command | ||
| 181 | //访问端口 | 181 | //访问端口 |
| 182 | $referrer_port = DB::connection('custom_mysql')->table('gl_customer_visit') | 182 | $referrer_port = DB::connection('custom_mysql')->table('gl_customer_visit') |
| 183 | ->select('device_port',DB::raw('COUNT(*) as num')) | 183 | ->select('device_port',DB::raw('COUNT(*) as num')) |
| 184 | - ->orderBy('num','desc')->where(['domain'=>$domain]) | 184 | + ->orderBy('num','desc') |
| 185 | ->whereBetween('updated_date', [$startTime,$endTime]) | 185 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 186 | ->groupBy('device_port') | 186 | ->groupBy('device_port') |
| 187 | ->limit(15)->get()->toArray(); | 187 | ->limit(15)->get()->toArray(); |
-
请 注册 或 登录 后发表评论