作者 lyh

gx

@@ -148,52 +148,6 @@ class ComController extends BaseController @@ -148,52 +148,6 @@ class ComController extends BaseController
148 } 148 }
149 149
150 public function ceshi(){ 150 public function ceshi(){
151 - $deployModel = new DeployBuild();  
152 - $list = $deployModel->list();  
153 - $data = [];  
154 - $yesterday = Carbon::yesterday()->toDateString();  
155 - foreach ($list as $v){  
156 - $v['test_domain'] = 'https://demomark.globalso.com/';  
157 - $arr = [];  
158 - $arr['pv_num'] = DB::table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();  
159 - $arr['ip_num'] = DB::table('gl_customer_visit')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();  
160 - $inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain'],'',1,100000000);  
161 - if($inquiry_list['status'] == 400){  
162 - $arr['inquiry_num'] = 0;  
163 - }else{  
164 - $arr['inquiry_num'] = $inquiry_list['data']['total'];  
165 - //询盘国家统计  
166 - $countryData = $inquiry_list['data']['data'];  
167 - $countryArr = [];  
168 - foreach ($countryData as $v1){  
169 - if(isset($countryArr[$v1['country']])){  
170 - $countryArr[$v1['country']]++;  
171 - }else{  
172 - $countryArr[$v1['country']] = 0;  
173 - }  
174 - }  
175 - arsort($countryArr);  
176 -  
177 - $top20 = array_slice($countryArr, 0, 20, true);  
178 151
179 - $arr['country'] = json_encode($top20);  
180 - var_dump(json_decode($arr['country']));  
181 - die();  
182 - }  
183 - $arr['date'] = $yesterday;  
184 - $rank_info = DB::table('gl_rank_data')->where(['updated_date'=>$yesterday,'lang'=>''])->select(['compliance_day'])->first();  
185 - if(empty($rank_info)){  
186 - $arr['compliance_day'] = 0;  
187 - }else{  
188 - $arr['compliance_day'] = $rank_info->compliance_day;  
189 - }  
190 - $arr['service_day'] = $v['service_duration'] - Common::getDaysToTargetDate($v['created_at']);  
191 - $arr['project_id'] = $v['project_id'];  
192 - $arr['created_at'] = date('Y-m-d H:i:s');  
193 - $arr['updated_at'] = date('Y-m-d H:i:s');  
194 - $data[] = $arr;  
195 - }  
196 - //判断数据是否存在  
197 - DB::table('gl_count')->insert($data);  
198 } 152 }
199 } 153 }