作者 lyh

gx

@@ -44,42 +44,4 @@ class CountController extends BaseController @@ -44,42 +44,4 @@ class CountController extends BaseController
44 $data['enterprise_service'] = $countLogic->enterprise_service(); 44 $data['enterprise_service'] = $countLogic->enterprise_service();
45 return $this->response('success',Code::SUCCESS,$data); 45 return $this->response('success',Code::SUCCESS,$data);
46 } 46 }
47 -  
48 - /***  
49 - * @name :(手动获取昨日数据统计)yesterday  
50 - * @author :lyh  
51 - * @method :post  
52 - * @time :2023/5/24 9:13  
53 - */  
54 - public function yesterday(){  
55 - $deployModel = new DeployBuild();  
56 - $list = $deployModel->list();  
57 - $data = [];  
58 - $yesterday = Carbon::yesterday()->toDateString();  
59 - foreach ($list as $v){  
60 - $arr = [];  
61 - $arr['yesterday_pv_num'] = DB::table('gl_customer_visit_item')->whereDate('date', $yesterday)->where('domain',$v['test_domain'])->count();  
62 - $arr['yesterday_ip_num'] = DB::table('gl_customer_visit')->whereDate('date', $yesterday)->where('domain',$v['test_domain'])->count();  
63 - $inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain']);  
64 - if($inquiry_list['status'] == self::STATUS_ERROR){  
65 - $arr['inquiry_num'] = 0;  
66 - }else{  
67 - $arr['inquiry_num'] = count($inquiry_list['data']['total']);  
68 - }  
69 - $arr['date'] = $yesterday;  
70 - $rank_info = DB::table('gl_rank_data')->where(['updated_date'=>$yesterday,'lang'=>''])->select(['compliance_day'])->first();  
71 - if(empty($rank_info)){  
72 - $arr['compliance_day'] = 0;  
73 - }else{  
74 - $arr['compliance_day'] = $rank_info->compliance_day;  
75 - }  
76 - $arr['service_day'] = $v['service_duration'] - Common::getDaysToTargetDate($v['created_at']);  
77 - $arr['project_id'] = $v['project_id'];  
78 - $arr['created_at'] = date('Y-m-d H:i:s');  
79 - $arr['updated_at'] = date('Y-m-d H:i:s');  
80 - $data[] = $arr;  
81 - }  
82 - DB::table('gl_count')->insert($data);  
83 - $this->response('success');  
84 - }  
85 } 47 }