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:
@@ -11,6 +11,8 @@ import {
|
||||
Request,
|
||||
} from '@nestjs/common';
|
||||
import { DepositsService } from './deposits.service';
|
||||
import { NotificationsService } from '../notifications/notifications.service';
|
||||
import { NotificationType } from '../entities/notification.entity';
|
||||
import { CreateDepositDto, RefundDepositDto, CreateDepositWithInstallmentsDto } from './dto/deposit.dto';
|
||||
import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
|
||||
import { OperationLogsService } from '../operation-logs/operation-logs.service';
|
||||
@@ -23,6 +25,7 @@ export class DepositsController {
|
||||
constructor(
|
||||
private service: DepositsService,
|
||||
private logService: OperationLogsService,
|
||||
private readonly notificationsService: NotificationsService,
|
||||
) {}
|
||||
|
||||
@Get()
|
||||
@@ -68,6 +71,7 @@ export class DepositsController {
|
||||
ipAddress,
|
||||
userAgent,
|
||||
});
|
||||
// TODO: Send notification for deposit_due — studentId→userId mapping unavailable
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -111,6 +115,7 @@ export class DepositsController {
|
||||
ipAddress,
|
||||
userAgent,
|
||||
});
|
||||
// TODO: Send notification for deposit_refunded — studentId→userId mapping unavailable
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ import { DepositInstallment } from '../entities/deposit-installment.entity';
|
||||
import { DepositsService } from './deposits.service';
|
||||
import { DepositsController } from './deposits.controller';
|
||||
import { OperationLogsModule } from '../operation-logs/operation-logs.module';
|
||||
import { NotificationsModule } from '../notifications/notifications.module';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([Deposit, DepositInstallment]), OperationLogsModule],
|
||||
imports: [TypeOrmModule.forFeature([Deposit, DepositInstallment]), OperationLogsModule, NotificationsModule],
|
||||
controllers: [DepositsController],
|
||||
providers: [DepositsService],
|
||||
exports: [DepositsService],
|
||||
|
||||
Reference in New Issue
Block a user