正在显示
1 个修改的文件
包含
4 行增加
和
2 行删除
| @@ -1655,10 +1655,12 @@ class LyhImportTest extends Command | @@ -1655,10 +1655,12 @@ class LyhImportTest extends Command | ||
| 1655 | } | 1655 | } |
| 1656 | ]'; | 1656 | ]'; |
| 1657 | $data = json_decode($str,true); | 1657 | $data = json_decode($str,true); |
| 1658 | - dd($data); | 1658 | + $customContentModel = new CustomModuleContent(); |
| 1659 | $customExtendContentTModel = new CustomModuleExtentContent(); | 1659 | $customExtendContentTModel = new CustomModuleExtentContent(); |
| 1660 | foreach ($data as $item){ | 1660 | foreach ($data as $item){ |
| 1661 | - $contentId = 1; | 1661 | + $contentId = $customContentModel->addReturnId(['name'=>$item['name'],'image'=>$item['image'],'release_at'=>$item['release_at']]); |
| 1662 | + $route = RouteMap::setRoute($contentId, RouteMap::SOURCE_MODULE, $contentId, $project_id); | ||
| 1663 | + $customContentModel->edit(['route'=>$route],['id'=>$contentId]); | ||
| 1662 | $saveData = [ | 1664 | $saveData = [ |
| 1663 | ['key'=>'pd_extended_field_1', 'type'=>4, 'values'=>$item['href'], 'content_id'=>$contentId, 'project_id'=>$project_id, 'module_id'=>5, 'created_at'=>date('Y-m-d H:i:s'), 'updated_at'=>date('Y-m-d H:i:s')], | 1665 | ['key'=>'pd_extended_field_1', 'type'=>4, 'values'=>$item['href'], 'content_id'=>$contentId, 'project_id'=>$project_id, 'module_id'=>5, 'created_at'=>date('Y-m-d H:i:s'), 'updated_at'=>date('Y-m-d H:i:s')], |
| 1664 | ]; | 1666 | ]; |
-
请 注册 或 登录 后发表评论