作者 lyh

gx复制项目脚本

... ... @@ -120,7 +120,13 @@ class AiBlogLogic extends BaseLogic
*/
public function blogDelete(){
try {
$aiSettingInfo = $this->getProjectAiSetting();
$aiBlogService = new AiBlogService();
foreach ($this->param['ids'] as $id) {
$info = $this->model->read(['id'=>$id],['task_id']);
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
$aiBlogService->key = $aiSettingInfo['key'];
$aiBlogService->delDetail($info['task_id']);
//删除路由映射
RouteMap::delRoute(RouteMap::SOURCE_AI_BLOG, $id, $this->user['project_id']);
$this->model->del(['id'=>$id]);
... ...
... ... @@ -233,4 +233,22 @@ class AiBlogService
$result = http_post($request_url,json_encode($param,true));
return $result;
}
/**
* @remark :删除文章
* @name :updateAuthorInfo
* @author :lyh
* @method :post
* @time :2025/3/4 16:22
* @param :task_id
*/
public function delDetail($task_id){
$param['task_id'] = $task_id;
$request_url = $this->url.'api/result/delete';
$param['mch_id'] = $this->mch_id;
$this->sign = $this->generateSign($param,$this->key);
$param['sign'] = $this->sign;
$result = http_post($request_url,json_encode($param,true));
return $result;
}
}
... ...