清除教师不存在的组
This commit is contained in:
@@ -350,12 +350,11 @@ public class SyncUserService implements ISyncUserService {
|
|||||||
if (g == null || g.getTransferStatus() == null || g.getTransferStatus().intValue() != TransferStatus.IN.getId()) continue;
|
if (g == null || g.getTransferStatus() == null || g.getTransferStatus().intValue() != TransferStatus.IN.getId()) continue;
|
||||||
String key = buildTeacherGroupKeyWithSchId(g.getTeaId(), g.getGroupId(), g.getSchId());
|
String key = buildTeacherGroupKeyWithSchId(g.getTeaId(), g.getGroupId(), g.getSchId());
|
||||||
if (!incomingGroupKeys.contains(key)) {
|
if (!incomingGroupKeys.contains(key)) {
|
||||||
g.setTransferStatus(TransferStatus.OUT.getId());
|
|
||||||
staleGroups.add(g);
|
staleGroups.add(g);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!staleGroups.isEmpty()) {
|
if (!staleGroups.isEmpty()) {
|
||||||
schTeacherGroupRepository.saveAll(staleGroups);
|
schTeacherGroupRepository.deleteAll(staleGroups);
|
||||||
log.info("清理教师历史脏组(已不在用户中心下发):数量={}", staleGroups.size());
|
log.info("清理教师历史脏组(已不在用户中心下发):数量={}", staleGroups.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user