|
...
|
...
|
@@ -30,6 +30,9 @@ class CountLogic extends BaseLogic |
|
|
|
'project_id' => $this->user['project_id']
|
|
|
|
];
|
|
|
|
$info = $this->model->read($param,['pv_num','ip_num','inquiry_num','date','compliance_day','service_day']);
|
|
|
|
if($info === false){
|
|
|
|
$info = [];
|
|
|
|
}
|
|
|
|
return $this->success($info);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -79,6 +82,9 @@ class CountLogic extends BaseLogic |
|
|
|
'project_id' => $this->user['project_id']
|
|
|
|
];
|
|
|
|
$data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']);
|
|
|
|
if($data === false){
|
|
|
|
$data = [];
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -122,11 +128,11 @@ class CountLogic extends BaseLogic |
|
|
|
* @time :2023/5/24 14:58
|
|
|
|
*/
|
|
|
|
public function inquiry_country_count(){
|
|
|
|
$data = DB::table('gl_xunpan_ipdata')
|
|
|
|
$data = DB::table('gl_inquiry_record')
|
|
|
|
->select('ip_area', DB::raw('COUNT(ip_area) as count'))
|
|
|
|
->groupBy('ip_area')->orderBy('count','desc')->limit(20)->get()->toArray();
|
|
|
|
$data = object_to_array($data);
|
|
|
|
$total = DB::table('gl_xunpan_ipdata')->count();
|
|
|
|
$total = DB::table('gl_inquiry_record')->count();
|
|
|
|
foreach ($data as $k=>$v){
|
|
|
|
$data[$k]['proportion'] = ($v['count']/$total) * 100;
|
|
|
|
}
|
...
|
...
|
|