|
@@ -26,10 +26,8 @@ use App\Services\DingService; |
|
@@ -26,10 +26,8 @@ use App\Services\DingService; |
|
26
|
use App\Services\ProjectServer;
|
26
|
use App\Services\ProjectServer;
|
|
27
|
use Illuminate\Console\Command;
|
27
|
use Illuminate\Console\Command;
|
|
28
|
use App\Models\Project\AiBlogTask as AiBlogTaskModel;
|
28
|
use App\Models\Project\AiBlogTask as AiBlogTaskModel;
|
|
29
|
-use Illuminate\Support\Facades\Cache;
|
|
|
|
30
|
use Illuminate\Support\Facades\DB;
|
29
|
use Illuminate\Support\Facades\DB;
|
|
31
|
use Illuminate\Support\Facades\Redis;
|
30
|
use Illuminate\Support\Facades\Redis;
|
|
32
|
-use function Symfony\Component\String\s;
|
|
|
|
33
|
|
31
|
|
|
34
|
class AiBlogTask extends Command
|
32
|
class AiBlogTask extends Command
|
|
35
|
{
|
33
|
{
|
|
@@ -257,6 +255,7 @@ class AiBlogTask extends Command |
|
@@ -257,6 +255,7 @@ class AiBlogTask extends Command |
|
257
|
$saveData = [];
|
255
|
$saveData = [];
|
|
258
|
$result = $aiBlogService->getAiBlogList($page,15);
|
256
|
$result = $aiBlogService->getAiBlogList($page,15);
|
|
259
|
if(!isset($result['status']) || $result['status'] != 200){
|
257
|
if(!isset($result['status']) || $result['status'] != 200){
|
|
|
|
258
|
+ try {
|
|
260
|
// 钉钉通知
|
259
|
// 钉钉通知
|
|
261
|
$dingService = new DingService();
|
260
|
$dingService = new DingService();
|
|
262
|
$body = [
|
261
|
$body = [
|
|
@@ -265,6 +264,12 @@ class AiBlogTask extends Command |
|
@@ -265,6 +264,12 @@ class AiBlogTask extends Command |
|
265
|
'isAtAll' => false, // 是否@所有人
|
264
|
'isAtAll' => false, // 是否@所有人
|
|
266
|
];
|
265
|
];
|
|
267
|
$dingService->handle($body);
|
266
|
$dingService->handle($body);
|
|
|
|
267
|
+ //写一条更新记录
|
|
|
|
268
|
+ $aiBlogTaskModel = new AiBlogTaskModel();
|
|
|
|
269
|
+ $aiBlogTaskModel->addReturnId(['project_id'=>$project_id,'task_id'=>$project_id,'status'=>$aiBlogTaskModel::STATUS_RUNNING,'type'=>$aiBlogTaskModel::TYPE_LIST]);
|
|
|
|
270
|
+ }catch (\Exception $e){
|
|
|
|
271
|
+ $this->output('更新列表页失败同时通知失败--error:' . $e->getMessage());
|
|
|
|
272
|
+ }
|
|
268
|
return true;
|
273
|
return true;
|
|
269
|
}
|
274
|
}
|
|
270
|
$total_page = $result['data']['total_page'];
|
275
|
$total_page = $result['data']['total_page'];
|