forked from wangziqi/gongxue-base
refactor: remove departmentId from Class entity
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user