|
@@ -152,8 +152,12 @@ public class StudentServiceImpl implements StudentService {
|
|
|
org.setParentId(rootOrgId);
|
|
|
org.setCode(orgCode);
|
|
|
org.setName(orgName);
|
|
|
+ org.setEnable(true);
|
|
|
+ org.setRootId(rootOrgId);
|
|
|
Org saved = orgRepo.save(org);
|
|
|
orgId = saved.getId();
|
|
|
+ } else {
|
|
|
+ orgId = org.getId();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -238,7 +242,7 @@ public class StudentServiceImpl implements StudentService {
|
|
|
if (null != studentInfo.getEnable()) {
|
|
|
student.setEnable(studentInfo.getEnable());
|
|
|
}
|
|
|
- Student saved = studentRepo.save(student);
|
|
|
+ Student saved = studentRepo.saveAndFlush(student);
|
|
|
|
|
|
return saved;
|
|
|
}
|