正在显示
1 个修改的文件
包含
8 行增加
和
3 行删除
| @@ -163,11 +163,16 @@ class CountLogic extends BaseLogic | @@ -163,11 +163,16 @@ class CountLogic extends BaseLogic | ||
| 163 | $customerVisitModel = new Visit(); | 163 | $customerVisitModel = new Visit(); |
| 164 | $data = $customerVisitModel->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) | 164 | $data = $customerVisitModel->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv')) |
| 165 | ->groupBy('country') | 165 | ->groupBy('country') |
| 166 | - ->orderBy('ip','desc')->limit(10)->get()->toArray(); | 166 | + ->orderBy('ip','desc')->limit(11)->get()->toArray(); |
| 167 | if(!empty($data)){ | 167 | if(!empty($data)){ |
| 168 | + $result =array(); | ||
| 168 | foreach ($data as $k => $v){ | 169 | foreach ($data as $k => $v){ |
| 169 | - $v['pv'] = (int)$v['pv']; | ||
| 170 | - $data[$k] = $v; | 170 | + if(($this->project['is_record_china_visit'] == 1) && ($v['country'] == '中国')){ |
| 171 | + continue; | ||
| 172 | + }else{ | ||
| 173 | + $v['pv'] = (int)$v['pv']; | ||
| 174 | + $result[] = $v; | ||
| 175 | + } | ||
| 171 | } | 176 | } |
| 172 | } | 177 | } |
| 173 | return $this->success($data); | 178 | return $this->success($data); |
-
请 注册 或 登录 后发表评论