作者 lyh

gx

... ... @@ -72,7 +72,7 @@ class AiVideoAutoPublish extends Command
$this->output('开始自动发布Video文章');
$projectModel = new Project();
$optimizeModel = new DeployOptimize();
$projectList = $projectModel->list(['is_ai_video'=>1,'id'=>1,'project_type'=>0,'delete_status'=>0,'site_status'=>0,'extend_type'=>0],'id',['id']);
$projectList = $projectModel->list(['is_ai_video'=>1,'delete_status'=>0,'site_status'=>0,'extend_type'=>0],'id',['id']);
foreach ($projectList as $item){
$this->output("项目{$item['id']}开始自动发布");
//获取当前是否开启自动发布aiVideo
... ... @@ -91,6 +91,9 @@ class AiVideoAutoPublish extends Command
$this->output("项目{$item['id']}未到执行时间" . $next_auto_date);
continue;
}
if($item['project_type'] == 1){
//todo::页面上获取数据
}else{
//获取当前网站的标题
ProjectServer::useProject($item['id']);
$data = $this->getVideoInfo();
... ... @@ -101,6 +104,7 @@ class AiVideoAutoPublish extends Command
['project_id'=>$item['id'],'title'=>$data['title'],'remark'=>$data['remark'],'images'=>json_encode($data['images'],true),'date'=>date('Y-m-d')]
);
}
}
DB::disconnect('custom_mysql');
}
}
... ... @@ -275,15 +279,15 @@ class AiVideoAutoPublish extends Command
}
/**
* @remark :
* @remark :页面获取
* @name :getAiVideoParam
* @author :lyh
* @method :post
* @time :2025/8/1 16:25
*/
public function getAiVideoParam()
public function getAiVideoParam($project_id)
{
$project_id = '1';
//获取当前网站域名
$domain = 'www.cs-conveyor.com';
try {
$sitemap_url = 'https://' . $domain . '/sitemap_post_tag.xml';
... ...
... ... @@ -36,7 +36,7 @@ class DomainInfoController extends BaseController
$sort = $this->map['sort'];
unset($this->map['sort']);
}
$lists = $domainModel->lists($this->map,$this->page,$this->row,$this->order,['*'],$sort = 'desc');
$lists = $domainModel->lists($this->map,$this->page,$this->row,$this->order,['*'],$sort ?? 'desc');
if(!empty($lists)){
$project_model = new Project();
$serverIpModel = new ServersIp();
... ...