作者 lyh

gx

@@ -33,7 +33,7 @@ class UpgradeProjectCount extends Command @@ -33,7 +33,7 @@ class UpgradeProjectCount extends Command
33 protected $description = '升级项目统计'; 33 protected $description = '升级项目统计';
34 34
35 public function handle(){ 35 public function handle(){
36 - $project_id = 627; 36 + $project_id = 600;
37 ProjectServer::useProject($project_id); 37 ProjectServer::useProject($project_id);
38 $this->count($project_id); 38 $this->count($project_id);
39 DB::disconnect('custom_mysql'); 39 DB::disconnect('custom_mysql');
@@ -35,8 +35,8 @@ class UpgradeProjectCount extends Command @@ -35,8 +35,8 @@ class UpgradeProjectCount extends Command
35 protected $description = '升级项目统计'; 35 protected $description = '升级项目统计';
36 36
37 public function handle(){ 37 public function handle(){
38 - $project_id = 627;  
39 - $url = 'airuize.goodao.net'; 38 + $project_id = 439;
  39 + $url = 'i527.goodao.net';
40 ProjectServer::useProject($project_id); 40 ProjectServer::useProject($project_id);
41 $this->count($project_id,$url); 41 $this->count($project_id,$url);
42 42
@@ -72,7 +72,7 @@ class UpgradeProjectCount extends Command @@ -72,7 +72,7 @@ class UpgradeProjectCount extends Command
72 $arr['country'] = json_encode($res['data']['data']); 72 $arr['country'] = json_encode($res['data']['data']);
73 } 73 }
74 $arr['month'] = $v['month']; 74 $arr['month'] = $v['month'];
75 - $arr = $this->pv_ip($arr,$start,$end); 75 + $arr = $this->pv_ip($arr,$start,$end,$project_id);
76 $arr = $this->sourceCount($arr,$start,$end); 76 $arr = $this->sourceCount($arr,$start,$end);
77 if($info === false){ 77 if($info === false){
78 $selectedDate = $start; 78 $selectedDate = $start;
@@ -95,9 +95,9 @@ class UpgradeProjectCount extends Command @@ -95,9 +95,9 @@ class UpgradeProjectCount extends Command
95 * @method :post 95 * @method :post
96 * @time :2024/1/8 11:02 96 * @time :2024/1/8 11:02
97 */ 97 */
98 - public function pv_ip(&$arr,$start,$end){ 98 + public function pv_ip(&$arr,$start,$end,$project_id){
99 $pv_ip = DB::table('gl_count') 99 $pv_ip = DB::table('gl_count')
100 - ->where(['project_id'=>627]) 100 + ->where(['project_id'=>$project_id])
101 ->where('date','>=',$start.' 00:00:00') 101 ->where('date','>=',$start.' 00:00:00')
102 ->where('date','<=',$end.' 23:59:59') 102 ->where('date','<=',$end.' 23:59:59')
103 ->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')) 103 ->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'))