公众号接口调整
This commit is contained in:
@@ -246,10 +246,11 @@ class Aiarticle extends Base
|
||||
if($iId === false){
|
||||
return json_encode(['status' => 4,'msg' => 'Data insertion failed']);
|
||||
}
|
||||
$aAiArticle = array_merge(['ai_article_id' => $iId,'article_id' => $iArticleId,'is_generate' => 2],$aInsert);
|
||||
}
|
||||
|
||||
//判断是否生成
|
||||
if($aAiArticle['is_generate'] == 1){
|
||||
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']);
|
||||
}
|
||||
|
||||
@@ -694,6 +695,7 @@ class Aiarticle extends Base
|
||||
Db::startTrans();
|
||||
//执行入库
|
||||
$aUpdateParam['update_time'] = time();
|
||||
$aUpdateParam['author'] = empty($aUpdateParam['author']) ? 'TMR编辑部' : $aUpdateParam['author'];
|
||||
$aUpdateParam['is_generate'] = 1;
|
||||
$result = Db::name('ai_article')->where('ai_article_id',$iAiArticleId)->limit(1)->update($aUpdateParam);
|
||||
if($result === false){
|
||||
|
||||
Reference in New Issue
Block a user