作者 lyh

gx ai视频

@@ -12,6 +12,7 @@ namespace App\Console\Commands\LyhTest; @@ -12,6 +12,7 @@ namespace App\Console\Commands\LyhTest;
12 use App\Helper\Arr; 12 use App\Helper\Arr;
13 use App\Helper\Translate; 13 use App\Helper\Translate;
14 use App\Models\Ai\AiBlog; 14 use App\Models\Ai\AiBlog;
  15 +use App\Models\Ai\AiBlogAuthor;
15 use App\Models\Blog\Blog; 16 use App\Models\Blog\Blog;
16 use App\Models\Com\WordCountry; 17 use App\Models\Com\WordCountry;
17 use App\Models\CustomModule\CustomModuleContent; 18 use App\Models\CustomModule\CustomModuleContent;
@@ -67,7 +68,7 @@ class UpdateRoute extends Command @@ -67,7 +68,7 @@ class UpdateRoute extends Command
67 */ 68 */
68 public function handle() 69 public function handle()
69 { 70 {
70 - return $this->getNullRoute(); 71 + return $this->getAiBlog();
71 } 72 }
72 73
73 /** 74 /**
@@ -77,16 +78,16 @@ class UpdateRoute extends Command @@ -77,16 +78,16 @@ class UpdateRoute extends Command
77 * @method :post 78 * @method :post
78 * @time :2025/4/21 11:52 79 * @time :2025/4/21 11:52
79 */ 80 */
80 - public function getNullRoute(){ 81 + public function getAiBlog(){
81 $projectModel = new Project(); 82 $projectModel = new Project();
82 $lists = $projectModel->list(['delete_status' => 0,'extend_type'=>0,'type'=>['in',[1,2,3,4]]], 'id', ['id']); 83 $lists = $projectModel->list(['delete_status' => 0,'extend_type'=>0,'type'=>['in',[1,2,3,4]]], 'id', ['id']);
83 foreach ($lists as $val) { 84 foreach ($lists as $val) {
84 echo date('Y-m-d H:i:s') . '开始--项目的id:'. $val['id'] . PHP_EOL; 85 echo date('Y-m-d H:i:s') . '开始--项目的id:'. $val['id'] . PHP_EOL;
85 ProjectServer::useProject($val['id']); 86 ProjectServer::useProject($val['id']);
86 - $keywordModel = new Keyword();  
87 - $info = $keywordModel->read(['route'=>'']);  
88 - if($info !== false){  
89 - echo '存在路由为空--项目id:'.$val['id'].PHP_EOL; 87 + $aiBlogModel = new AiBlogAuthor();
  88 + $results = $aiBlogModel->whereColumn('new_title', '!=', 'seo_title')->get();
  89 + if(!$results){
  90 + echo '项目id:'.$val['id'].PHP_EOL;
90 } 91 }
91 DB::disconnect('custom_mysql'); 92 DB::disconnect('custom_mysql');
92 } 93 }
@@ -151,7 +152,7 @@ class UpdateRoute extends Command @@ -151,7 +152,7 @@ class UpdateRoute extends Command
151 * @method :post 152 * @method :post
152 * @time :2025/3/21 17:45 153 * @time :2025/3/21 17:45
153 */ 154 */
154 - public function getAiBlog($project_id){ 155 + public function getAiBlogs($project_id){
155 $aiBlogModel = new AiBlog(); 156 $aiBlogModel = new AiBlog();
156 $lists = $aiBlogModel->list(['updated_at'=>['<=','2025-03-21 00:00:00']]); 157 $lists = $aiBlogModel->list(['updated_at'=>['<=','2025-03-21 00:00:00']]);
157 if(!empty($lists)){ 158 if(!empty($lists)){
@@ -24,7 +24,7 @@ class AiVideoController extends BaseController @@ -24,7 +24,7 @@ class AiVideoController extends BaseController
24 * @time :2025/3/5 14:12 24 * @time :2025/3/5 14:12
25 */ 25 */
26 public function lists(AiVideo $aiVideo){ 26 public function lists(AiVideo $aiVideo){
27 - $lists = $aiVideo->lists($this->map,$this->page,$this->row,'id',['id','keyword','new_title','route','image','task_id','status','created_at','updated_at']); 27 + $lists = $aiVideo->lists($this->map,$this->page,$this->row,'id',['id','title','route','video_url','image','task_id','status','created_at','updated_at']);
28 if(!empty($lists) && !empty($lists['list'])){ 28 if(!empty($lists) && !empty($lists['list'])){
29 foreach ($lists['list'] as $k => $v){ 29 foreach ($lists['list'] as $k => $v){
30 $v['image'] = getImageUrl($v['image']); 30 $v['image'] = getImageUrl($v['image']);
@@ -51,7 +51,6 @@ class AiVideoController extends BaseController @@ -51,7 +51,6 @@ class AiVideoController extends BaseController
51 'id.required' => '主键不能为空', 51 'id.required' => '主键不能为空',
52 ]); 52 ]);
53 $info = $aiVideo->read(['id'=>$this->param['id']]); 53 $info = $aiVideo->read(['id'=>$this->param['id']]);
54 - $info['image'] = getImageUrl($info['image']);  
55 $this->response('success',Code::SUCCESS,$info); 54 $this->response('success',Code::SUCCESS,$info);
56 } 55 }
57 56