refactor: remove departmentId from Class entity

This commit is contained in:
2026-07-09 17:32:37 +08:00
parent 40fef906cd
commit 22bc1876d8
9 changed files with 4 additions and 116 deletions

View File

@@ -86,27 +86,6 @@ export class ClassesController {
return result;
}
/** 从钉钉同步部门创建班级 */
@Post('from-department')
@RequirePermission('class:create')
async createFromDepartment(
@Body() dto: { departmentId: number; name?: string; classType?: string },
@Request() req: any,
) {
const result = await this.service.createFromDepartment(dto);
await this.logService.log({
userId: req.user?.id,
username: req.user?.username,
module: '班级管理',
action: '从部门创建班级',
targetId: result.id,
targetType: 'class',
detail: `班级${result.code} ${result.name}`,
ipAddress: extractRequestInfo(req).ipAddress,
userAgent: extractRequestInfo(req).userAgent,
});
return result;
}
/** 批量导入学生到班级通过钉钉用户ID */
@Post(':id/students/import')