|
...
|
...
|
@@ -42,7 +42,7 @@ class MonthCountLogic extends BaseLogic |
|
|
|
unset($source_country[$k1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$v['source_country'] = array_values($source_country);
|
|
|
|
$v['source_country'] = json_encode(array_values($source_country));
|
|
|
|
$lists[$k] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -158,9 +158,9 @@ class MonthCountLogic extends BaseLogic |
|
|
|
$query = DB::connection('custom_mysql')->table('gl_customer_visit')
|
|
|
|
->select('country',DB::raw('COUNT(*) as ip'),DB::raw('SUM(depth) as pv'))
|
|
|
|
->groupBy('country');
|
|
|
|
if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){
|
|
|
|
$query->where('country','<>','中国');
|
|
|
|
}
|
|
|
|
// if(isset($this->project['is_record_china_visit']) && ($this->project['is_record_china_visit'] == 0)){
|
|
|
|
// $query->where('country','<>','中国');
|
|
|
|
// }
|
|
|
|
$source_country = $query->whereBetween('updated_date', [$startTime,$endTime])
|
|
|
|
->orderBy('ip','desc')->limit(15)->get()->toArray();
|
|
|
|
$arr['source_country'] = $source_country;
|
...
|
...
|
|