作者 lyh

gx

... ... @@ -33,7 +33,7 @@ class UpgradeProjectCount extends Command
protected $description = '升级项目统计';
public function handle(){
$project_id = 627;
$project_id = 600;
ProjectServer::useProject($project_id);
$this->count($project_id);
DB::disconnect('custom_mysql');
... ...
... ... @@ -35,8 +35,8 @@ class UpgradeProjectCount extends Command
protected $description = '升级项目统计';
public function handle(){
$project_id = 627;
$url = 'airuize.goodao.net';
$project_id = 439;
$url = 'i527.goodao.net';
ProjectServer::useProject($project_id);
$this->count($project_id,$url);
... ... @@ -72,7 +72,7 @@ class UpgradeProjectCount extends Command
$arr['country'] = json_encode($res['data']['data']);
}
$arr['month'] = $v['month'];
$arr = $this->pv_ip($arr,$start,$end);
$arr = $this->pv_ip($arr,$start,$end,$project_id);
$arr = $this->sourceCount($arr,$start,$end);
if($info === false){
$selectedDate = $start;
... ... @@ -95,9 +95,9 @@ class UpgradeProjectCount extends Command
* @method :post
* @time :2024/1/8 11:02
*/
public function pv_ip(&$arr,$start,$end){
public function pv_ip(&$arr,$start,$end,$project_id){
$pv_ip = DB::table('gl_count')
->where(['project_id'=>627])
->where(['project_id'=>$project_id])
->where('date','>=',$start.' 00:00:00')
->where('date','<=',$end.' 23:59:59')
->select(DB::raw('SUM(pv_num) as pv_num'), DB::raw('SUM(ip_num) as ip_num'),DB::raw('SUM(inquiry_num) as inquiry_num'))
... ...