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