作者 lyh

gx

... ... @@ -11,6 +11,7 @@ namespace App\Console\Commands\MonthlyCount;
use App\Helper\FormGlobalsoApi;
use App\Models\Com\UpdateOldInfo;
use App\Models\Domain\DomainInfo;
use App\Models\HomeCount\MonthCount;
use App\Models\Project\Project;
use App\Models\Visit\Visit;
... ... @@ -39,7 +40,13 @@ class UpgradeProjectCount extends Command
$project_id = $this->argument('project_id');
$oldModel = new UpdateOldInfo();
$info = $oldModel->read(['project_id'=>$project_id]);
$url = $info['old_domain_online'];
if($info !== false){
$url = $info['old_domain_online'];
}else{
$domainModel = new DomainInfo();
$info = $domainModel->read(['project_id'=>$project_id]);
$url = $info['domain'];
}
ProjectServer::useProject($project_id);
$this->count($project_id,$url);
DB::disconnect('custom_mysql');
... ...