正在显示
1 个修改的文件
包含
2 行增加
和
3 行删除
| @@ -26,7 +26,7 @@ class UpgradeProjectCount extends Command | @@ -26,7 +26,7 @@ class UpgradeProjectCount extends Command | ||
| 26 | * | 26 | * |
| 27 | * @var string | 27 | * @var string |
| 28 | */ | 28 | */ |
| 29 | - protected $signature = 'upgrade_month_count'; | 29 | + protected $signature = 'upgrade_month_count {project_id}'; |
| 30 | 30 | ||
| 31 | /** | 31 | /** |
| 32 | * The console command description. | 32 | * The console command description. |
| @@ -36,13 +36,12 @@ class UpgradeProjectCount extends Command | @@ -36,13 +36,12 @@ class UpgradeProjectCount extends Command | ||
| 36 | protected $description = '升级项目统计'; | 36 | protected $description = '升级项目统计'; |
| 37 | 37 | ||
| 38 | public function handle(){ | 38 | public function handle(){ |
| 39 | - $project_id = 769; | 39 | + $project_id = $this->argument('project_id'); |
| 40 | $oldModel = new UpdateOldInfo(); | 40 | $oldModel = new UpdateOldInfo(); |
| 41 | $info = $oldModel->read(['project_id'=>$project_id]); | 41 | $info = $oldModel->read(['project_id'=>$project_id]); |
| 42 | $url = $info['old_domain_online']; | 42 | $url = $info['old_domain_online']; |
| 43 | ProjectServer::useProject($project_id); | 43 | ProjectServer::useProject($project_id); |
| 44 | $this->count($project_id,$url); | 44 | $this->count($project_id,$url); |
| 45 | - | ||
| 46 | DB::disconnect('custom_mysql'); | 45 | DB::disconnect('custom_mysql'); |
| 47 | } | 46 | } |
| 48 | 47 |
-
请 注册 或 登录 后发表评论