fix: normalize operation log module names across controllers

This commit is contained in:
2026-07-05 19:38:18 +08:00
parent efe13fe664
commit f962633f67
5 changed files with 63 additions and 53 deletions

View File

@@ -53,7 +53,7 @@ export class OccupanciesController {
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '入住',
module: '入住管理',
action: '批量退宿',
detail: `退宿 ${dto.ids.length} 人,日期 ${dto.checkOutDate}`,
ipAddress,
@@ -70,8 +70,8 @@ export class OccupanciesController {
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '入住',
action: '入住登记',
module: '入住管理',
action: '办理入住',
targetId: result.id,
targetType: 'occupancy',
detail: `学生${dto.studentId} 入住房间${dto.roomId}`,
@@ -89,8 +89,8 @@ export class OccupanciesController {
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '入住',
action: '退宿',
module: '入住管理',
action: '办理退宿',
targetId: +id,
targetType: 'occupancy',
ipAddress,
@@ -107,8 +107,8 @@ export class OccupanciesController {
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '入住',
action: '换房',
module: '入住管理',
action: '调换宿舍',
targetId: +id,
targetType: 'occupancy',
detail: `换到房间${dto.newRoomId}`,
@@ -126,7 +126,7 @@ export class OccupanciesController {
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '入住',
module: '入住管理',
action: '删除入住记录',
targetId: +id,
targetType: 'occupancy',
@@ -144,7 +144,7 @@ export class OccupanciesController {
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '入住',
module: '入住管理',
action: '批量删除入住记录',
detail: `IDs: ${(body.ids || []).join(',')}`,
ipAddress,
@@ -338,7 +338,7 @@ export class OccupanciesController {
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '入住',
module: '入住管理',
action: '批量导入入住',
detail: result.message,
ipAddress,