Compare commits
No commits in common. "a1e0516476b66d6c7fa6fcd64730aeb764370794" and "d85ebeb7f0817082b1a17b98f996b0d1170363de" have entirely different histories.
a1e0516476
...
d85ebeb7f0
|
|
@ -13,7 +13,6 @@ import org.springframework.beans.BeanUtils;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
|
||||
@Service
|
||||
public class StudentServiceImpl extends ServiceImpl<StudentInfoMapper, StudentInfo> implements IStudentInfoService {
|
||||
|
|
@ -39,13 +38,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentInfoMapper, StudentIn
|
|||
Long studentId = baseInfo.getStudentId();
|
||||
Long studentBaseId = baseInfo.getStudentBaseId();
|
||||
|
||||
StudentInfo existingStudentInfo = studentInfoMapper.selectById(studentId);
|
||||
Date preservedPreRegistrationTime = existingStudentInfo != null ? existingStudentInfo.getPreRegistrationTime() : null;
|
||||
|
||||
studentInfo.setStudentId(studentId);
|
||||
studentBaseInfo.setStudentBaseId(studentBaseId);
|
||||
// 保留原有预报名时间,若之前未设置则用当前时间
|
||||
studentInfo.setPreRegistrationTime(preservedPreRegistrationTime != null ? preservedPreRegistrationTime : new Date());
|
||||
|
||||
studentInfoMapper.updateById(studentInfo);
|
||||
studentBaseInfoMapper.updateById(studentBaseInfo);
|
||||
|
|
@ -54,8 +48,6 @@ public class StudentServiceImpl extends ServiceImpl<StudentInfoMapper, StudentIn
|
|||
else {
|
||||
// 学生学业信息入库
|
||||
BeanUtils.copyProperties(studentInfoValidate, studentInfo);
|
||||
// 预报名时间:新增时设置为当前时间
|
||||
studentInfo.setPreRegistrationTime(new Date());
|
||||
studentInfoMapper.insert(studentInfo);
|
||||
|
||||
// 学生基本信息入库
|
||||
|
|
|
|||
Loading…
Reference in New Issue