Ai 话术调整
This commit is contained in:
@@ -58,10 +58,20 @@ class Aiarticle extends Base
|
|||||||
public function create($aParam = []){
|
public function create($aParam = []){
|
||||||
//获取参数
|
//获取参数
|
||||||
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
$aParam = empty($aParam) ? $this->request->post() : $aParam;
|
||||||
$iArticleId = empty($aParam['article_id']) ? '' : $aParam['article_id'];
|
$iArticleId = empty($aParam['article_id']) ? 0 : $aParam['article_id'];
|
||||||
if(empty($iArticleId)){
|
if(empty($iArticleId)){
|
||||||
return json_encode(array('status' => 2,'msg' => 'Please select an article'.json_encode($aParam) ));
|
return json_encode(array('status' => 2,'msg' => 'Please select an article'.json_encode($aParam) ));
|
||||||
}
|
}
|
||||||
|
$iPArticleId = empty($aParam['p_article_id']) ? 0 : $aParam['p_article_id'];
|
||||||
|
if(!empty($iPArticleId)){
|
||||||
|
//获取官网ID
|
||||||
|
$aWhere = ['p_article_id' => $iPArticleId];
|
||||||
|
$aProductionArticle = Db::name('production_article')->field('w_article_id')->where($aWhere)->find();
|
||||||
|
if(empty($aProductionArticle['w_article_id'])){
|
||||||
|
return json_encode(['status' => 2,'msg' => 'The article was not successfully pushed']);
|
||||||
|
}
|
||||||
|
$iArticleId = $aProductionArticle['w_article_id'];
|
||||||
|
}
|
||||||
//媒体类型
|
//媒体类型
|
||||||
$iMediaType = empty($aParam['media_type']) ? 1 : $aParam['media_type'];
|
$iMediaType = empty($aParam['media_type']) ? 1 : $aParam['media_type'];
|
||||||
//获取文章是否生成AI内容
|
//获取文章是否生成AI内容
|
||||||
|
|||||||
Reference in New Issue
Block a user