清除教师不存在的组
This commit is contained in:
@@ -393,12 +393,11 @@ public class SyncUserService implements ISyncUserService {
|
||||
for (SchTeacherGroup g : currentInGroups) {
|
||||
// 教师已不存在(teaId 不在本次下发名单):清除该教师在本校的所有组
|
||||
if (g.getTeaId() == null || !teaIds.contains(g.getTeaId())) {
|
||||
g.setTransferStatus(TransferStatus.OUT.getId());
|
||||
toTransferOut.add(g);
|
||||
}
|
||||
}
|
||||
if (!toTransferOut.isEmpty()) {
|
||||
schTeacherGroupRepository.saveAll(toTransferOut);
|
||||
schTeacherGroupRepository.deleteAll(toTransferOut);
|
||||
log.info("清理用户中心不存在的教师组:schId={}, 转出教师分组数={}", schId, toTransferOut.size());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user