feat(msg): 修复通知服务并添加ES降级与Push Gateway推送

database.ts 导出db常量替代getDb()函数

env.ts JWT_SECRET/ES_URL改optional加DEV_MODE/PUSH_GATEWAY_URL

elasticsearch.ts ES降级: ES_URL未设置时esClient=null

notifications.service.ts 加createBatch+分页查询+Push Gateway推送调用

新建msg-init.sql创建2张表
This commit is contained in:
SpecialX
2026-07-09 09:08:57 +08:00
parent 421edd8a41
commit 416e1bc0b2
14 changed files with 498 additions and 207 deletions

View File

@@ -1,7 +1,10 @@
import { Module } from '@nestjs/common';
import { NotificationsModule } from './notifications/notifications.module.js';
import { Module } from "@nestjs/common";
import { NotificationsModule } from "./notifications/notifications.module.js";
import { HealthModule } from "./shared/health/health.module.js";
import { LifecycleService } from "./shared/lifecycle/lifecycle.service.js";
@Module({
imports: [NotificationsModule],
imports: [NotificationsModule, HealthModule],
providers: [LifecycleService],
})
export class AppModule {}