forked from wangziqi/gongxue-base
docs: remove 班主任 distinction — all teachers use roleType='teacher'
This commit is contained in:
@@ -130,11 +130,9 @@ export class ImportUsersDto {
|
||||
}
|
||||
```
|
||||
|
||||
### 3. 班主任判定
|
||||
### 3. 教师角色判定
|
||||
|
||||
通过角色表查询:查找用户分配的角色中 `code === 'head_teacher'` 或 `name === '班主任'` 的角色。若命中且其 `dingDeptIds` 中存在被标记为班级的部门,则将该用户作为该班级的班主任。
|
||||
|
||||
「班主任」角色 code 尚未定义 → 在角色 seed 中新增 `head_teacher` 作为班主任角色的 code 标识。
|
||||
通过角色表查询:导入时勾选的用户分配指定角色后即为「老师」。所有老师在班级关联中统一写入 `ClassTeacher`(`roleType = 'teacher'`),不区分班主任/任课老师。班级对老师为多对多关系。
|
||||
|
||||
### 4. 错误场景
|
||||
|
||||
@@ -142,7 +140,6 @@ export class ImportUsersDto {
|
||||
|---|---|
|
||||
|班级编码重复|事务回滚,返回 `"班级编码 XX 已存在"`|
|
||||
|部门标为班级但无人|班级正常创建(空班),warning|
|
||||
|一个班级多班主任|第一个设 headTeacherId,其余写入 ClassTeacher,warning|
|
||||
|用户在多个被标记的部门|同时加入所有匹配班级|
|
||||
|无 classes 参数|兼容旧调用,仅导入师生,不创建班级|
|
||||
|角色不存在|事务回滚,返回具体错误|
|
||||
|
||||
Reference in New Issue
Block a user