|
...
|
...
|
@@ -18,6 +18,7 @@ use App\Models\Product\Category; |
|
|
|
use App\Models\Product\Product;
|
|
|
|
use App\Models\Project\OnlineCheck;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\WebSetting\WebSetting;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
...
|
...
|
@@ -168,6 +169,15 @@ class SyncInquiryProject extends Command |
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
ProjectServer::useProject($val->id);
|
|
|
|
|
|
|
|
//排除白帽个人服务器项目
|
|
|
|
$seo_type = WebSetting::where('project_id', $val->id)->value('seo_type');
|
|
|
|
if ($seo_type == 2) {
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
//判断项目7天之内是否有询盘
|
|
|
|
$recent_inquiry = 0;
|
|
|
|
$inquiry_list = $form_api->getInquiryList('https://' . $domain . '/');
|
|
...
|
...
|
@@ -176,14 +186,14 @@ class SyncInquiryProject extends Command |
|
|
|
$recent_inquiry = 1;
|
|
|
|
} else {
|
|
|
|
//自定义询盘也加入判断
|
|
|
|
ProjectServer::useProject($val->id);
|
|
|
|
$last_inquiry_time = InquiryFormData::orderBy('submit_at', 'desc')->value('submit_at');
|
|
|
|
if ($last_inquiry_time > $last_week_time) {
|
|
|
|
$recent_inquiry = 1;
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}
|
|
|
|
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
|
|
|
|
$project = InquiryProject::saveProject($date, InquiryProject::VERSION_SIX, $val->id, $val->title, $val->channel['channel_id'], 'https://' . $domain . '/', $recent_inquiry, $val->inquiry_prompt ?? '');
|
|
|
|
$this->pushTask($project->id);
|
|
|
|
}
|
...
|
...
|
|