|
@@ -6,6 +6,7 @@ use App\Helper\Translate; |
|
@@ -6,6 +6,7 @@ use App\Helper\Translate; |
|
6
|
use App\Http\Logic\Bside\BaseLogic;
|
6
|
use App\Http\Logic\Bside\BaseLogic;
|
|
7
|
use App\Models\Ai\AiBlog;
|
7
|
use App\Models\Ai\AiBlog;
|
|
8
|
use App\Models\Ai\AiBlogAuthor;
|
8
|
use App\Models\Ai\AiBlogAuthor;
|
|
|
|
9
|
+use App\Models\Com\Notify;
|
|
9
|
use App\Models\Project\AiBlogTask;
|
10
|
use App\Models\Project\AiBlogTask;
|
|
10
|
use App\Models\Project\ProjectAiSetting;
|
11
|
use App\Models\Project\ProjectAiSetting;
|
|
11
|
use App\Models\RouteMap\RouteMap;
|
12
|
use App\Models\RouteMap\RouteMap;
|
|
@@ -65,6 +66,7 @@ class AiBlogLogic extends BaseLogic |
|
@@ -65,6 +66,7 @@ class AiBlogLogic extends BaseLogic |
|
65
|
}catch (\Exception $e){
|
66
|
}catch (\Exception $e){
|
|
66
|
$this->fail('保存失败,请联系管理员');
|
67
|
$this->fail('保存失败,请联系管理员');
|
|
67
|
}
|
68
|
}
|
|
|
|
69
|
+ $this->sendHttpC([$this->param['route'],'top-blog']);
|
|
68
|
return $this->success();
|
70
|
return $this->success();
|
|
69
|
}
|
71
|
}
|
|
70
|
|
72
|
|
|
@@ -91,6 +93,7 @@ class AiBlogLogic extends BaseLogic |
|
@@ -91,6 +93,7 @@ class AiBlogLogic extends BaseLogic |
|
91
|
}catch (\Exception $e){
|
93
|
}catch (\Exception $e){
|
|
92
|
$this->fail('保存失败,请联系管理员');
|
94
|
$this->fail('保存失败,请联系管理员');
|
|
93
|
}
|
95
|
}
|
|
|
|
96
|
+ $this->sendHttpC([$this->param['route'],'top-blog']);
|
|
94
|
return $this->success();
|
97
|
return $this->success();
|
|
95
|
}
|
98
|
}
|
|
96
|
|
99
|
|
|
@@ -131,13 +134,14 @@ class AiBlogLogic extends BaseLogic |
|
@@ -131,13 +134,14 @@ class AiBlogLogic extends BaseLogic |
|
131
|
$aiSettingInfo = $this->getProjectAiSetting();
|
134
|
$aiSettingInfo = $this->getProjectAiSetting();
|
|
132
|
$aiBlogService = new AiBlogService();
|
135
|
$aiBlogService = new AiBlogService();
|
|
133
|
foreach ($this->param['ids'] as $id) {
|
136
|
foreach ($this->param['ids'] as $id) {
|
|
134
|
- $info = $this->model->read(['id'=>$id],['task_id']);
|
137
|
+ $info = $this->model->read(['id'=>$id],['task_id','route']);
|
|
135
|
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
|
138
|
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
|
|
136
|
$aiBlogService->key = $aiSettingInfo['key'];
|
139
|
$aiBlogService->key = $aiSettingInfo['key'];
|
|
137
|
$aiBlogService->delDetail($info['task_id']);
|
140
|
$aiBlogService->delDetail($info['task_id']);
|
|
138
|
//删除路由映射
|
141
|
//删除路由映射
|
|
139
|
RouteMap::delRoute(RouteMap::SOURCE_AI_BLOG, $id, $this->user['project_id']);
|
142
|
RouteMap::delRoute(RouteMap::SOURCE_AI_BLOG, $id, $this->user['project_id']);
|
|
140
|
$this->model->del(['id'=>$id]);
|
143
|
$this->model->del(['id'=>$id]);
|
|
|
|
144
|
+ $this->curlDelRoute(['old_route'=>$info['route']]);
|
|
141
|
}
|
145
|
}
|
|
142
|
Artisan::call('save_ai_blog_list', ['project_id' => $this->user['project_id']]);
|
146
|
Artisan::call('save_ai_blog_list', ['project_id' => $this->user['project_id']]);
|
|
143
|
}catch (\Exception $e){
|
147
|
}catch (\Exception $e){
|
|
@@ -145,4 +149,5 @@ class AiBlogLogic extends BaseLogic |
|
@@ -145,4 +149,5 @@ class AiBlogLogic extends BaseLogic |
|
145
|
}
|
149
|
}
|
|
146
|
return $this->success();
|
150
|
return $this->success();
|
|
147
|
}
|
151
|
}
|
|
|
|
152
|
+
|
|
148
|
} |
153
|
} |