删除排序

This commit is contained in:
2026-08-25 17:54:55 +08:00
parent 2314a1adac
commit f055c07c99
2 changed files with 5 additions and 1 deletions
@@ -157,6 +157,7 @@ public class SchStudentImportService {
stu.setStatus(UserStatus.NORMAL.getId()); stu.setStatus(UserStatus.NORMAL.getId());
stu.setTransferStatus(TransferStatus.IN.getId()); stu.setTransferStatus(TransferStatus.IN.getId());
stu.setAbnormalStatus(StuAbnormalStatus.NORMAL.getId()); stu.setAbnormalStatus(StuAbnormalStatus.NORMAL.getId());
stu.setSchId(schId);
} }
} }
@@ -62,7 +62,10 @@ public class SchStudentInfoService {
Integer id = entityDTO.getId(); Integer id = entityDTO.getId();
Integer classId = entityDTO.getClassId(); Integer classId = entityDTO.getClassId();
SchStudent entity = ModelMapperUtil.map(entityDTO, SchStudent.class); // 必须使用 SchStudent 实体实例作为目标,避免把 SchStudentDTO(继承 SchStudent 的子类)直接交给 JPA,
// 否则 Hibernate 按运行时类型 SchStudentDTO 查找实体会抛出 Unknown entity。
SchStudent entity = new SchStudent();
ModelMapperUtil.map(entityDTO, entity);
if (StringUtils.isNotBlank(entity.getStuClassNo())) { if (StringUtils.isNotBlank(entity.getStuClassNo())) {
try { try {