正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
| @@ -23,7 +23,7 @@ class UpgradeProjectCount extends Command | @@ -23,7 +23,7 @@ class UpgradeProjectCount extends Command | ||
| 23 | * | 23 | * |
| 24 | * @var string | 24 | * @var string |
| 25 | */ | 25 | */ |
| 26 | - protected $signature = 'upgrade_count'; | 26 | + protected $signature = 'upgrade_count {project_id}'; |
| 27 | 27 | ||
| 28 | /** | 28 | /** |
| 29 | * The console command description. | 29 | * The console command description. |
| @@ -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 = 769; | 36 | + $project_id = $this->argument('project_id'); |
| 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'); |
| @@ -100,7 +100,8 @@ class UpgradeProjectCount extends Command | @@ -100,7 +100,8 @@ class UpgradeProjectCount extends Command | ||
| 100 | * @time :2023/6/14 15:40 | 100 | * @time :2023/6/14 15:40 |
| 101 | */ | 101 | */ |
| 102 | public function pv_num($day){ | 102 | public function pv_num($day){ |
| 103 | - $pv = DB::connection('custom_mysql')->table('gl_customer_visit_item')->whereDate('updated_date', $day)->count(); | 103 | + //$pv = DB::connection('custom_mysql')->table('gl_customer_visit_item')->whereDate('updated_date', $day)->count(); |
| 104 | + $pv = DB::connection('custom_mysql')->table('gl_customer_visit')->whereDate('updated_date', $day)->sum('depth'); | ||
| 104 | return $pv; | 105 | return $pv; |
| 105 | } | 106 | } |
| 106 | 107 |
-
请 注册 或 登录 后发表评论