消息推送

This commit is contained in:
mzl
2025-08-20 19:14:27 +08:00
parent 9f96b8d625
commit 58dc6729d9
5 changed files with 130 additions and 5 deletions
+15 -4
View File
@@ -6,6 +6,7 @@ use app\common\model\InquiryLog;
use app\common\model\User;
use app\common\model\UserRoles;
use app\common\model\UserSystems;
use app\common\service\MessageNotificationsService;
use app\common\traits\DataPermission;
use app\common\utils\email\MailSend;
use app\common\utils\scaffold\Generate;
@@ -106,11 +107,21 @@ class IndexController
public function test()
{
$service = new \app\common\service\MessageNotificationsService();
$udis = $service->getAllUserIds();
// $data = [
// 'sender_id' => 0,
// 'sender_type' => 'system',
// 'title' => '测试消息 - 标题',
// 'content' => '测试消息 - 内容',
// 'scene' => 1,
// 'recipient' => [1],
// ];
var_dump($udis);
// // 同步推送
// (new MessageNotificationsService())->pushNotice($data);
return json($udis);
// // 异步推送
// \Webman\RedisQueue\Redis::send('notice', $data);
return json($data);
}
}