正在显示
1 个修改的文件
包含
6 行增加
和
5 行删除
| @@ -22,6 +22,7 @@ use App\Models\File\File; | @@ -22,6 +22,7 @@ use App\Models\File\File; | ||
| 22 | use App\Models\File\File as FileModel; | 22 | use App\Models\File\File as FileModel; |
| 23 | use App\Models\File\Image; | 23 | use App\Models\File\Image; |
| 24 | use App\Models\File\Image as ImageModel; | 24 | use App\Models\File\Image as ImageModel; |
| 25 | +use App\Models\News\News; | ||
| 25 | use App\Models\Product\Keyword; | 26 | use App\Models\Product\Keyword; |
| 26 | use App\Models\Product\Product; | 27 | use App\Models\Product\Product; |
| 27 | use App\Models\Project\DeployOptimize; | 28 | use App\Models\Project\DeployOptimize; |
| @@ -56,12 +57,12 @@ class Demo extends Command | @@ -56,12 +57,12 @@ class Demo extends Command | ||
| 56 | 57 | ||
| 57 | public function handle(){ | 58 | public function handle(){ |
| 58 | $projectModel = new Project(); | 59 | $projectModel = new Project(); |
| 59 | - $list = $projectModel->list(['id'=>1462]); | 60 | + $list = $projectModel->list(['id'=>503]); |
| 60 | foreach ($list as $v){ | 61 | foreach ($list as $v){ |
| 61 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | 62 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; |
| 62 | ProjectServer::useProject($v['id']); | 63 | ProjectServer::useProject($v['id']); |
| 63 | - $blogModel = new Blog(); | ||
| 64 | - $blogList = $blogModel->list(['status'=>0],'id',['*'],'asc'); | 64 | + $newsModel = new News(); |
| 65 | + $blogList = $newsModel->list(['status'=>1],'id',['*'],'asc'); | ||
| 65 | foreach ($blogList as $blogV){ | 66 | foreach ($blogList as $blogV){ |
| 66 | $customContentModel = new CustomModuleContent(); | 67 | $customContentModel = new CustomModuleContent(); |
| 67 | $id = $customContentModel->addReturnId([ | 68 | $id = $customContentModel->addReturnId([ |
| @@ -77,12 +78,12 @@ class Demo extends Command | @@ -77,12 +78,12 @@ class Demo extends Command | ||
| 77 | 'project_id'=>$blogV['project_id'], | 78 | 'project_id'=>$blogV['project_id'], |
| 78 | 'created_at'=>$blogV['created_at'], | 79 | 'created_at'=>$blogV['created_at'], |
| 79 | 'updated_at'=>$blogV['updated_at'], | 80 | 'updated_at'=>$blogV['updated_at'], |
| 80 | - 'module_id'=>8, | 81 | + 'module_id'=>10, |
| 81 | 'video'=>null, | 82 | 'video'=>null, |
| 82 | 'release_at'=>$blogV['release_at'], | 83 | 'release_at'=>$blogV['release_at'], |
| 83 | 'operator_id'=>$blogV['operator_id'] | 84 | 'operator_id'=>$blogV['operator_id'] |
| 84 | ]); | 85 | ]); |
| 85 | - RouteMap::setRoute($blogV['url'],RouteMap::SOURCE_MODULE,$id,1462); | 86 | + RouteMap::setRoute($blogV['url'],RouteMap::SOURCE_MODULE,$id,503); |
| 86 | } | 87 | } |
| 87 | DB::disconnect('custom_mysql'); | 88 | DB::disconnect('custom_mysql'); |
| 88 | } | 89 | } |
-
请 注册 或 登录 后发表评论