AI生成调整
This commit is contained in:
@@ -85,10 +85,8 @@ class Aiarticle extends Base
|
||||
}
|
||||
|
||||
//查询AI内容是否生成
|
||||
$aAiArticle = json_decode($this->getAiArticle(['article_id' => $iArticleId]),true);
|
||||
$aAiArticleContent = empty($aAiArticle['data']) ? [] : $aAiArticle['data'];
|
||||
$aAiArticle = empty($aAiArticleContent['ai_article']) ? [] : $aAiArticleContent['ai_article'];
|
||||
|
||||
$aWhere = ['is_delete' => 2,'article_id' => $iArticleId];
|
||||
$aAiArticle = Db::name('ai_article')->where($aWhere)->find();
|
||||
$iId = empty($aAiArticle['ai_article_id']) ? 0 : $aAiArticle['ai_article_id'];
|
||||
if(empty($aAiArticle)){
|
||||
//插入t_ai_article数据
|
||||
@@ -100,6 +98,7 @@ class Aiarticle extends Base
|
||||
}
|
||||
$aAiArticle = array_merge(['ai_article_id' => $iId,'article_id' => $iArticleId,'is_generate' => 2],$aInsert);
|
||||
}
|
||||
|
||||
//判断是否生成
|
||||
if(!empty($aAiArticle['is_generate']) && $aAiArticle['is_generate'] == 1){
|
||||
return json_encode(['status' => 5,'msg' => 'The data has been generated, please proceed with the next steps']);
|
||||
|
||||
Reference in New Issue
Block a user