作者 lyh

gxAiblog自动发布

@@ -51,7 +51,7 @@ class lyhDemo extends Command @@ -51,7 +51,7 @@ class lyhDemo extends Command
51 51
52 public function handle(){ 52 public function handle(){
53 $projectModel = new Project(); 53 $projectModel = new Project();
54 - $lists = $projectModel->list(['delete_status' => 0,'id'=>467,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id', ['id']); 54 + $lists = $projectModel->list(['delete_status' => 0,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id', ['id']);
55 foreach ($lists as $val) { 55 foreach ($lists as $val) {
56 $aiSettingInfo = $this->getSetting($val['id']); 56 $aiSettingInfo = $this->getSetting($val['id']);
57 if($aiSettingInfo === false){ 57 if($aiSettingInfo === false){
@@ -68,7 +68,6 @@ class lyhDemo extends Command @@ -68,7 +68,6 @@ class lyhDemo extends Command
68 ProjectServer::useProject($val['id']); 68 ProjectServer::useProject($val['id']);
69 $aiBlogService = new AiBlogService($val['id']); 69 $aiBlogService = new AiBlogService($val['id']);
70 foreach ($blog_lists as $item) { 70 foreach ($blog_lists as $item) {
71 - echo date('Y-m-d H:i:s') . '开始--项目的id:' . $item['project_id'] . PHP_EOL;  
72 $aiBlogModel = new AiBlog(); 71 $aiBlogModel = new AiBlog();
73 $aiBlogInfo = $aiBlogModel->read(['task_id' => $item['task_id']], ['id']); 72 $aiBlogInfo = $aiBlogModel->read(['task_id' => $item['task_id']], ['id']);
74 if ($aiBlogInfo === false) { 73 if ($aiBlogInfo === false) {
@@ -113,7 +112,6 @@ class lyhDemo extends Command @@ -113,7 +112,6 @@ class lyhDemo extends Command
113 } 112 }
114 }catch (\Exception $e){ 113 }catch (\Exception $e){
115 echo '跳过。'.PHP_EOL; 114 echo '跳过。'.PHP_EOL;
116 - DB::disconnect('custom_mysql');  
117 } 115 }
118 DB::disconnect('custom_mysql'); 116 DB::disconnect('custom_mysql');
119 echo date('Y-m-d H:i:s') . '结束--项目的id:'. $item['project_id'] . PHP_EOL; 117 echo date('Y-m-d H:i:s') . '结束--项目的id:'. $item['project_id'] . PHP_EOL;