|
...
|
...
|
@@ -56,12 +56,12 @@ class lyhDemo extends Command |
|
|
|
echo date('Y-m-d H:i:s') . '开始--项目的id:'. $val['id'] . PHP_EOL;
|
|
|
|
ProjectServer::useProject($val['id']);
|
|
|
|
$aiBlogModel = new AiBlog();
|
|
|
|
$aiLists = $aiBlogModel->list(['status'=>2]);
|
|
|
|
$aiLists = $aiBlogModel->list(['status'=>2],'id',['seo_description']);
|
|
|
|
if(!empty($aiLists)){
|
|
|
|
foreach ($aiLists as $item){
|
|
|
|
if(!empty($item['seo_description'])){
|
|
|
|
$text = $this->trimToLastFullWord($item['seo_description']);
|
|
|
|
echo $text.PHP_EOL;
|
|
|
|
$aiBlogModel->edit(['seo_description'=>$text],['id'=>$item['id']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|