同步草稿箱避免重复执行

This commit is contained in:
chengxl
2025-07-09 11:49:39 +08:00
parent 006e105392
commit 3f06b0b850

View File

@@ -1022,6 +1022,13 @@ class Aiarticle extends Base
return json_encode(['status' => 2, 'msg' => 'Please select an article']);
}
//判断草稿箱是否上传
$oMaterial = new Material;
$aLog = json_decode($oMaterial->getWechatLog(['article_id' => $iArticleId,'type' => 2,'status' =>1]),true);
if(!empty($aLog['data'])){
return json_encode(['status' => 1,'msg' => 'Already uploaded to draft box','data' => []]);
}
//判断文章类型
$article_type = empty($aParam['article_type']) ? 'news' : $aParam['article_type'];
if(!in_array($article_type, ['news','newspic'])){