|
...
|
...
|
@@ -13,6 +13,7 @@ use App\Models\Ai\AiBlog; |
|
|
|
use App\Models\Ai\AiBlogAuthor;
|
|
|
|
use App\Models\Project\AiBlogTask as AiBlogTaskModel;
|
|
|
|
use App\Models\Project\ProjectAiSetting;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Services\AiBlogService;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Console\Command;
|
|
...
|
...
|
@@ -108,16 +109,18 @@ class AiBlogAuthorTask extends Command |
|
|
|
if(empty($data)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
$param = [];
|
|
|
|
$aiBlogAuthorModel = new AiBlogAuthor();
|
|
|
|
foreach ($data as $v){
|
|
|
|
$param[] = [
|
|
|
|
$param = [
|
|
|
|
'author_id'=>$v['id'],
|
|
|
|
'title'=>$v['title'],
|
|
|
|
'image'=>$v['picture'],
|
|
|
|
'description'=>$v['description'],
|
|
|
|
];
|
|
|
|
$id = $aiBlogAuthorModel->addReturnId($param);
|
|
|
|
$route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_AI_BLOG_AUTHOR, $id, $this->user['project_id']);
|
|
|
|
$this->model->edit(['route'=>$route],['id'=>$id]);
|
|
|
|
}
|
|
|
|
$aiBlogAuthorModel = new AiBlogAuthor();
|
|
|
|
return $aiBlogAuthorModel->insertAll($param);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|