正在显示
1 个修改的文件
包含
22 行增加
和
0 行删除
| @@ -31,6 +31,21 @@ class MonthCountLogic extends BaseLogic | @@ -31,6 +31,21 @@ class MonthCountLogic extends BaseLogic | ||
| 31 | public function getCountLists($map,$order = 'created_at',$filed = ['*']){ | 31 | public function getCountLists($map,$order = 'created_at',$filed = ['*']){ |
| 32 | $map['project_id'] = $this->user['project_id']; | 32 | $map['project_id'] = $this->user['project_id']; |
| 33 | $lists = $this->model->list($map,$order,$filed); | 33 | $lists = $this->model->list($map,$order,$filed); |
| 34 | + if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){ | ||
| 35 | + foreach ($lists as $k => $v){ | ||
| 36 | + if(empty($v['source_country'])){ | ||
| 37 | + continue; | ||
| 38 | + } | ||
| 39 | + $source_country = json_decode($v['source_country']); | ||
| 40 | + foreach ($source_country as $k1 => $v1){ | ||
| 41 | + if($v1['country'] == '中国'){ | ||
| 42 | + unset($source_country[$k1]); | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + $v['source_country'] = $source_country; | ||
| 46 | + $lists[$k] = $v; | ||
| 47 | + } | ||
| 48 | + } | ||
| 34 | $lists['new'] = $this->currentMonthCount(); | 49 | $lists['new'] = $this->currentMonthCount(); |
| 35 | return $this->success($lists); | 50 | return $this->success($lists); |
| 36 | } | 51 | } |
| @@ -145,6 +160,13 @@ class MonthCountLogic extends BaseLogic | @@ -145,6 +160,13 @@ class MonthCountLogic extends BaseLogic | ||
| 145 | ->groupBy('country') | 160 | ->groupBy('country') |
| 146 | ->whereBetween('updated_date', [$startTime,$endTime]) | 161 | ->whereBetween('updated_date', [$startTime,$endTime]) |
| 147 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); | 162 | ->orderBy('ip','desc')->limit(15)->get()->toArray(); |
| 163 | + if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){ | ||
| 164 | + foreach ($source_country as $k => $v){ | ||
| 165 | + if($v['country'] == '中国'){ | ||
| 166 | + unset($source_country[$k]); | ||
| 167 | + } | ||
| 168 | + } | ||
| 169 | + } | ||
| 148 | $arr['source_country'] = $source_country; | 170 | $arr['source_country'] = $source_country; |
| 149 | //受访界面前15 | 171 | //受访界面前15 |
| 150 | $referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit') | 172 | $referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit') |
-
请 注册 或 登录 后发表评论