|
...
|
...
|
@@ -44,42 +44,4 @@ class CountController extends BaseController |
|
|
|
$data['enterprise_service'] = $countLogic->enterprise_service();
|
|
|
|
return $this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
|
|
* @name :(手动获取昨日数据统计)yesterday
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/5/24 9:13
|
|
|
|
*/
|
|
|
|
public function yesterday(){
|
|
|
|
$deployModel = new DeployBuild();
|
|
|
|
$list = $deployModel->list();
|
|
|
|
$data = [];
|
|
|
|
$yesterday = Carbon::yesterday()->toDateString();
|
|
|
|
foreach ($list as $v){
|
|
|
|
$arr = [];
|
|
|
|
$arr['yesterday_pv_num'] = DB::table('gl_customer_visit_item')->whereDate('date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
|
|
$arr['yesterday_ip_num'] = DB::table('gl_customer_visit')->whereDate('date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
|
|
$inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain']);
|
|
|
|
if($inquiry_list['status'] == self::STATUS_ERROR){
|
|
|
|
$arr['inquiry_num'] = 0;
|
|
|
|
}else{
|
|
|
|
$arr['inquiry_num'] = count($inquiry_list['data']['total']);
|
|
|
|
}
|
|
|
|
$arr['date'] = $yesterday;
|
|
|
|
$rank_info = DB::table('gl_rank_data')->where(['updated_date'=>$yesterday,'lang'=>''])->select(['compliance_day'])->first();
|
|
|
|
if(empty($rank_info)){
|
|
|
|
$arr['compliance_day'] = 0;
|
|
|
|
}else{
|
|
|
|
$arr['compliance_day'] = $rank_info->compliance_day;
|
|
|
|
}
|
|
|
|
$arr['service_day'] = $v['service_duration'] - Common::getDaysToTargetDate($v['created_at']);
|
|
|
|
$arr['project_id'] = $v['project_id'];
|
|
|
|
$arr['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
$arr['updated_at'] = date('Y-m-d H:i:s');
|
|
|
|
$data[] = $arr;
|
|
|
|
}
|
|
|
|
DB::table('gl_count')->insert($data);
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|