forked from wangziqi/gongxue-base
feat: integrate notification creation into business modules (classes, schedules done; bills/occupancies/deposits need student→userId mapping)
This commit is contained in:
@@ -13,6 +13,8 @@ import {
|
||||
Req,
|
||||
} from '@nestjs/common';
|
||||
import { BillsService } from './bills.service';
|
||||
import { NotificationsService } from '../notifications/notifications.service';
|
||||
import { NotificationType } from '../entities/notification.entity';
|
||||
import { BillsExportService } from './bills-export.service';
|
||||
import { GenerateBillsDto, UpdateBillStatusDto } from './dto/bill.dto';
|
||||
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
||||
@@ -28,6 +30,7 @@ export class BillsController {
|
||||
private service: BillsService,
|
||||
private exportService: BillsExportService,
|
||||
private logService: OperationLogsService,
|
||||
private readonly notificationsService: NotificationsService,
|
||||
) {}
|
||||
|
||||
@Post('generate')
|
||||
@@ -44,6 +47,7 @@ export class BillsController {
|
||||
ipAddress,
|
||||
userAgent,
|
||||
});
|
||||
// TODO: Send notifications for bill_generated — studentId→userId mapping unavailable
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -88,6 +92,7 @@ export class BillsController {
|
||||
ipAddress,
|
||||
userAgent,
|
||||
});
|
||||
// TODO: Send notification for bill_paid — bill.studentId→userId mapping unavailable
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -105,6 +110,7 @@ export class BillsController {
|
||||
ipAddress,
|
||||
userAgent,
|
||||
});
|
||||
// TODO: Send notification for bill_paid (batch) — bill.studentId→userId mapping unavailable
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { NotificationsModule } from '../notifications/notifications.module';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { Bill } from '../entities/bill.entity';
|
||||
import { BillItem } from '../entities/bill-item.entity';
|
||||
@@ -22,6 +23,7 @@ import { BillsController } from './bills.controller';
|
||||
Room,
|
||||
Deposit,
|
||||
]),
|
||||
NotificationsModule,
|
||||
],
|
||||
controllers: [BillsController],
|
||||
providers: [BillsService, BillsExportService],
|
||||
|
||||
Reference in New Issue
Block a user