Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into lms
正在显示
2 个修改的文件
包含
9 行增加
和
3 行删除
| @@ -30,6 +30,9 @@ class CountLogic extends BaseLogic | @@ -30,6 +30,9 @@ class CountLogic extends BaseLogic | ||
| 30 | 'project_id' => $this->user['project_id'] | 30 | 'project_id' => $this->user['project_id'] |
| 31 | ]; | 31 | ]; |
| 32 | $info = $this->model->read($param,['pv_num','ip_num','inquiry_num','date','compliance_day','service_day']); | 32 | $info = $this->model->read($param,['pv_num','ip_num','inquiry_num','date','compliance_day','service_day']); |
| 33 | + if($info === false){ | ||
| 34 | + $info = []; | ||
| 35 | + } | ||
| 33 | return $this->success($info); | 36 | return $this->success($info); |
| 34 | } | 37 | } |
| 35 | 38 | ||
| @@ -79,6 +82,9 @@ class CountLogic extends BaseLogic | @@ -79,6 +82,9 @@ class CountLogic extends BaseLogic | ||
| 79 | 'project_id' => $this->user['project_id'] | 82 | 'project_id' => $this->user['project_id'] |
| 80 | ]; | 83 | ]; |
| 81 | $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']); | 84 | $data = $rankDataModel->read($param,['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num']); |
| 85 | + if($data === false){ | ||
| 86 | + $data = []; | ||
| 87 | + } | ||
| 82 | return $this->success($data); | 88 | return $this->success($data); |
| 83 | } | 89 | } |
| 84 | 90 | ||
| @@ -122,11 +128,11 @@ class CountLogic extends BaseLogic | @@ -122,11 +128,11 @@ class CountLogic extends BaseLogic | ||
| 122 | * @time :2023/5/24 14:58 | 128 | * @time :2023/5/24 14:58 |
| 123 | */ | 129 | */ |
| 124 | public function inquiry_country_count(){ | 130 | public function inquiry_country_count(){ |
| 125 | - $data = DB::table('gl_xunpan_ipdata') | 131 | + $data = DB::table('gl_inquiry_record') |
| 126 | ->select('ip_area', DB::raw('COUNT(ip_area) as count')) | 132 | ->select('ip_area', DB::raw('COUNT(ip_area) as count')) |
| 127 | ->groupBy('ip_area')->orderBy('count','desc')->limit(20)->get()->toArray(); | 133 | ->groupBy('ip_area')->orderBy('count','desc')->limit(20)->get()->toArray(); |
| 128 | $data = object_to_array($data); | 134 | $data = object_to_array($data); |
| 129 | - $total = DB::table('gl_xunpan_ipdata')->count(); | 135 | + $total = DB::table('gl_inquiry_record')->count(); |
| 130 | foreach ($data as $k=>$v){ | 136 | foreach ($data as $k=>$v){ |
| 131 | $data[$k]['proportion'] = ($v['count']/$total) * 100; | 137 | $data[$k]['proportion'] = ($v['count']/$total) * 100; |
| 132 | } | 138 | } |
-
请 注册 或 登录 后发表评论