|
...
|
...
|
@@ -6,6 +6,7 @@ use App\Helper\Translate; |
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\Ai\AiBlog;
|
|
|
|
use App\Models\Ai\AiBlogAuthor;
|
|
|
|
use App\Models\Com\Notify;
|
|
|
|
use App\Models\Project\AiBlogTask;
|
|
|
|
use App\Models\Project\ProjectAiSetting;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
...
|
...
|
@@ -65,6 +66,7 @@ class AiBlogLogic extends BaseLogic |
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
$this->sendHttpC([$this->param['route'],'top-blog']);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -91,6 +93,7 @@ class AiBlogLogic extends BaseLogic |
|
|
|
}catch (\Exception $e){
|
|
|
|
$this->fail('保存失败,请联系管理员');
|
|
|
|
}
|
|
|
|
$this->sendHttpC([$this->param['route'],'top-blog']);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -131,13 +134,14 @@ class AiBlogLogic extends BaseLogic |
|
|
|
$aiSettingInfo = $this->getProjectAiSetting();
|
|
|
|
$aiBlogService = new AiBlogService();
|
|
|
|
foreach ($this->param['ids'] as $id) {
|
|
|
|
$info = $this->model->read(['id'=>$id],['task_id']);
|
|
|
|
$info = $this->model->read(['id'=>$id],['task_id','route']);
|
|
|
|
$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]);
|
|
|
|
$this->curlDelRoute(['old_route'=>$info['route']]);
|
|
|
|
}
|
|
|
|
Artisan::call('save_ai_blog_list', ['project_id' => $this->user['project_id']]);
|
|
|
|
}catch (\Exception $e){
|
|
...
|
...
|
@@ -145,4 +149,5 @@ class AiBlogLogic extends BaseLogic |
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
} |
...
|
...
|
|