作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !326
... ... @@ -12,6 +12,7 @@ namespace App\Http\Controllers\Aside\Com;
use App\Helper\Common;
use App\Http\Controllers\Bside\BaseController;
use App\Models\Com\UpdateLog;
use App\Models\Domain\DomainInfo;
use App\Models\Project\ProjectUpdateTdk;
use App\Services\ProjectServer;
use Illuminate\Support\Facades\DB;
... ... @@ -66,7 +67,7 @@ class UpdateController extends BaseController
$project = ProjectServer::useProject($this->param['project_id']);
if(!$project){
if (!$project) {
$this->fail('项目不存在');
}
... ... @@ -86,10 +87,13 @@ class UpdateController extends BaseController
//关闭数据库
DB::disconnect('custom_mysql');
//查看项目是否已上线
$domain_info = DomainInfo::where('project_id', $this->param['project_id'])->first();
$update = ['collect_status' => 0];
// if ($this->param['type'] == 2) {
// $update['status'] = 0;
// }
if ($this->param['type'] == 2 && !$domain_info) {
$update['status'] = 0;
}
UpdateLog::where('project_id', $this->param['project_id'])->whereIn('api_type', ['post', 'page', 'news', 'blog'])->update($update);
... ...