作者 赵彬吉
... ... @@ -53,7 +53,7 @@ class AiVideoListTask extends Command
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('执行的项目id->'.$project_id, true) . PHP_EOL, FILE_APPEND);
ProjectServer::useProject($project_id);
$this->updateBlogList($project_id);
// $this->curlDelRoute($project_id);
$this->curlDelRoute($project_id);
DB::disconnect('custom_mysql');
return true;
}
... ...
... ... @@ -34,7 +34,6 @@ class RemainDay extends Command
* @var 暂停的项目
*/
protected $ceaseProjectId = [
47,
354,
378,
649,
... ...
... ... @@ -458,7 +458,7 @@ class LyhImportTest extends Command
}
fclose($file_handle);
$customContentModel = new CustomModuleContent();
$customCategoryModel = new CustomModuleCategory();;
$customCategoryModel = new CustomModuleCategory();
$customExtendContentTModel = new CustomModuleExtentContent();
foreach ($line_of_text as $k => $item){
// try {
... ...
... ... @@ -13,6 +13,7 @@ use App\Console\Commands\Domain\DomainInfo;
use App\Models\Com\NoticeLog;
use App\Models\Project\AiBlogTask;
use App\Models\Project\DeployBuild;
use App\Models\Project\OnlineCheck;
use App\Models\Project\Project;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
... ... @@ -35,14 +36,7 @@ class lyhDemo extends Command
protected $description = '更新路由';
public function handle(){
$projectBuildModel = new DeployBuild();
$projectList = $projectBuildModel->list(['plan'=>0,'seo_plan'=>1],'project_id');
foreach ($projectList as $val){
if(!empty($val['service_duration']) && empty($val['seo_service_duration'])){
$projectBuildModel->edit(['seo_service_duration'=>$val['service_duration']],['id'=>$val['id']]);
echo '项目id:'.$val['project_id'].PHP_EOL;
}
}
return true;
}
}
... ...
... ... @@ -183,8 +183,8 @@ class Supervisory extends Command
$ids = Project::leftJoin('gl_project_deploy_optimize as b', 'gl_project.id', '=', 'b.project_id')
->leftJoin('gl_project_online_check as c', 'gl_project.id', '=', 'c.project_id')
->leftJoin('gl_domain_info as d', 'gl_project.id', '=', 'd.project_id')
// ->where('gl_project.type', Project::TYPE_TWO)
->whereIn('gl_project.type',[Project::TYPE_TWO,Project::TYPE_THREE])
->where('gl_project_deploy_optimize.domain','!=',0)
->where('gl_project.type', Project::TYPE_TWO)
->where('gl_project.extend_type', 0) // 是否续费是由extend_type字段控制
->where('gl_project.delete_status', Project::IS_DEL_FALSE)
->where(function ($subQuery) {
... ...
... ... @@ -285,7 +285,7 @@ class PrivateController extends BaseController
public function getProjectOnline(Request $request)
{
$page_size = intval($request->input('page_size', 20));
$projects = Project::select(['id', 'title', 'company', 'type', 'finish_remain_day', 'remain_day'])->whereIn('type', [2, 3, 4, 6])->where('delete_status', 0)->paginate($page_size);
$projects = Project::select(['id', 'title', 'company', 'type', 'finish_remain_day', 'remain_day'])->where('extend_type', 0)->whereIn('type', [2, 3, 4, 6])->where('delete_status', 0)->paginate($page_size);
foreach ($projects as $project) {
$project->domain = $project->domainInfo ? $project->domainInfo->domain : '';
}
... ... @@ -354,7 +354,7 @@ class PrivateController extends BaseController
public function upgradeProjectDomain()
{
$domain = Project::leftJoin('gl_domain_info', 'gl_project.id', '=', 'gl_domain_info.project_id')
->where(['gl_project.is_upgrade' => Project::IS_UPGRADE_TRUE, 'gl_project.delete_status' => Project::IS_DEL_FALSE])
->where(['gl_project.is_upgrade' => Project::IS_UPGRADE_TRUE, 'gl_project.delete_status' => Project::IS_DEL_FALSE, 'gl_project.extend_type' => 0])
->pluck('domain')
->toArray();
$list = array_filter(array_unique($domain));
... ...
... ... @@ -805,7 +805,7 @@ class ProjectController extends BaseController
"id" => $item['id'],
"title" => $item['title'],
"company" => $item['company'],
"type" => $item['type'],
"type" => $item['extend_type'] ?: $item['type'],
"type_text" => Project::typeMap()[$item['type']] ?? '',
"channel" => $item['channel'],
"created_at" => $item['created_at'],
... ...
... ... @@ -50,6 +50,7 @@ class AiVideoLogic extends BaseLogic
}catch (\Exception $e){
$this->fail('保存失败,请联系管理员');
}
shell_exec("php artisan save_ai_video_list {$this->user['project_id']} > /dev/null 2>&1 &");
return $this->success();
}
... ... @@ -93,6 +94,7 @@ class AiVideoLogic extends BaseLogic
}catch (\Exception $e){
$this->fail('删除失败,请联系管理员');
}
shell_exec("php artisan save_ai_video_list {$this->user['project_id']} > /dev/null 2>&1 &");
return $this->success();
}
... ...
... ... @@ -31,8 +31,7 @@ class BTemplateModuleProjectLogic extends BaseLogic
*/
public function ModuleList($map,$order = 'created_at',$filed = ['id','name','status','image','html','project_id']){
$map['deleted_status'] = 0;
$map['project_id'] = $this->user['project_id'];
$list = $this->model->list($map,$order,$filed);
$list = $this->model::whereRaw("FIND_IN_SET(?, project_id)", [$this->user['project_id']])->get()->toArray();
$templateLabel = new TemplateLabel();
$label = [];
foreach ($list as $v){
... ...
... ... @@ -545,8 +545,8 @@ class RankDataLogic extends BaseLogic
$without_project_ids = []; //不用处理排名的项目
$without_extension_project_ids = [658]; //是否达标只统计主词的
$extension_project_ids = [354]; //扩展词也到达标的
$compliance_project_ids = [2163,257,823,1750,497,2523,325,156]; //直接达标处理的
$ceaseProjectId = [47, 354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250];//暂停的项目
$compliance_project_ids = [2163,257,823,1750,497]; //直接达标处理的
$ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250];//暂停的项目
$uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目
//一个项目多个api_no
$multiple_api_no_project_ids = [
... ...