fix: F12 P2 follow-up — batch imports set departmentId, optimize getDescendantIds, enforce campus root invariant

This commit is contained in:
2026-07-06 01:06:11 +08:00
parent 6b0a21d266
commit 3bcb7d41c0
7 changed files with 36 additions and 11 deletions

View File

@@ -284,7 +284,8 @@ export class StudentsController {
}
}
}
const result = await this.service.batchImport(rows);
const departmentId = req.headers?.['x-campus-id'] ? parseInt(String(req.headers['x-campus-id']), 10) || undefined : undefined;
const result = await this.service.batchImport(rows, departmentId);
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,