作者 lyh

gx

... ... @@ -31,6 +31,21 @@ class MonthCountLogic extends BaseLogic
public function getCountLists($map,$order = 'created_at',$filed = ['*']){
$map['project_id'] = $this->user['project_id'];
$lists = $this->model->list($map,$order,$filed);
if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){
foreach ($lists as $k => $v){
if(empty($v['source_country'])){
continue;
}
$source_country = json_decode($v['source_country']);
foreach ($source_country as $k1 => $v1){
if($v1['country'] == '中国'){
unset($source_country[$k1]);
}
}
$v['source_country'] = $source_country;
$lists[$k] = $v;
}
}
$lists['new'] = $this->currentMonthCount();
return $this->success($lists);
}
... ... @@ -145,6 +160,13 @@ class MonthCountLogic extends BaseLogic
->groupBy('country')
->whereBetween('updated_date', [$startTime,$endTime])
->orderBy('ip','desc')->limit(15)->get()->toArray();
if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){
foreach ($source_country as $k => $v){
if($v['country'] == '中国'){
unset($source_country[$k]);
}
}
}
$arr['source_country'] = $source_country;
//受访界面前15
$referrer_url = DB::connection('custom_mysql')->table('gl_customer_visit')
... ...