|
...
|
...
|
@@ -4,7 +4,9 @@ namespace App\Console\Commands; |
|
|
|
|
|
|
|
use App\Helper\Common;
|
|
|
|
use App\Models\Ai\AiCommand;
|
|
|
|
use App\Models\Mail\Mail;
|
|
|
|
use App\Models\Project\DeployOptimize;
|
|
|
|
use App\Models\User\User;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
...
|
...
|
@@ -64,6 +66,8 @@ class UpdateSeoTdk extends Command |
|
|
|
$this->updateNews($project_id);
|
|
|
|
$this->updateNewsCate($project_id);
|
|
|
|
$this->updatePage($project_id);
|
|
|
|
//发送站内信
|
|
|
|
$this->send_message($project_id);
|
|
|
|
DB::disconnect('custom_mysql');
|
|
|
|
}catch (\Exception $e){
|
|
|
|
echo date('Y-m-d H:i:s') . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;
|
|
...
|
...
|
@@ -419,4 +423,20 @@ class UpdateSeoTdk extends Command |
|
|
|
return $data['text'];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :发送站内信
|
|
|
|
* @name :send_message
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/11/4 10:22
|
|
|
|
*/
|
|
|
|
public function send_message($project_id){
|
|
|
|
$user = new User();
|
|
|
|
$userInfo = $user->read(['project_id'=>$project_id,'role_id'=>0]);
|
|
|
|
$data["title"] = "seo更新通知---完成";
|
|
|
|
$data["user_list"] = $userInfo['id'];
|
|
|
|
$data["content"] = "seo更新成功,更新完成时间".date('Y-m-d H:i:s');
|
|
|
|
$mail = new Mail();
|
|
|
|
return $mail->add($data);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|