正在显示
1 个修改的文件
包含
10 行增加
和
2 行删除
| @@ -53,12 +53,20 @@ class lyhDemo extends Command | @@ -53,12 +53,20 @@ class lyhDemo extends Command | ||
| 53 | echo $this->trimToLastFullWord('You know, in the last few years, the world of global trade has really changed a lot, and Chinese manufacturing is right at the center of this shift. C'); | 53 | echo $this->trimToLastFullWord('You know, in the last few years, the world of global trade has really changed a lot, and Chinese manufacturing is right at the center of this shift. C'); |
| 54 | die(); | 54 | die(); |
| 55 | $projectModel = new Project(); | 55 | $projectModel = new Project(); |
| 56 | - $lists = $projectModel->list(['delete_status' => 0,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id', ['id']); | 56 | + $lists = $projectModel->list(['delete_status' => 0,'id'=>467,'extend_type'=>0,'type'=>['in',[1,2,3,4,6]]], 'id', ['id']); |
| 57 | foreach ($lists as $val) { | 57 | foreach ($lists as $val) { |
| 58 | echo date('Y-m-d H:i:s') . '开始--项目的id:'. $val['id'] . PHP_EOL; | 58 | echo date('Y-m-d H:i:s') . '开始--项目的id:'. $val['id'] . PHP_EOL; |
| 59 | ProjectServer::useProject($val['id']); | 59 | ProjectServer::useProject($val['id']); |
| 60 | $aiBlogModel = new AiBlog(); | 60 | $aiBlogModel = new AiBlog(); |
| 61 | - $aiBlogModel->list(['status'=>2]); | 61 | + $aiLists = $aiBlogModel->list(['status'=>2]); |
| 62 | + if(!empty($aiLists)){ | ||
| 63 | + foreach ($AiLists as $item){ | ||
| 64 | + if(!empty($item['seo_description'])){ | ||
| 65 | + $text = $this->trimToLastFullWord($item['seo_description']); | ||
| 66 | + echo $text.PHP_EOL; | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | + } | ||
| 62 | DB::disconnect('custom_mysql'); | 70 | DB::disconnect('custom_mysql'); |
| 63 | } | 71 | } |
| 64 | return true; | 72 | return true; |
-
请 注册 或 登录 后发表评论