Commit 6d8e9559 authored by Ryan Loong's avatar Ryan Loong

update 成绩更新时出bug

parent cbb28cd6
......@@ -108,10 +108,19 @@ public class StudentPointService {
return "add OK";
}
public StudentPointInfo selectByPrimaryKey(Integer id) {
return Objects.isNull(id) ? null
: studentPointInfoMapper.selectOneByExample(new StudentPointInfoExample().createCriteria()
.andDeletedEqualTo(StudentPointInfo.NOT_DELETED)
.andIdEqualTo(id)
.example());
}
public Object updatePoint(StudentPointInfo studentPoint) {
LocalDateTime now = LocalDateTime.now();
studentPoint.setUpdateTime(now);
studentPointInfoMapper.updateByPrimaryKey(studentPoint);
StudentPointInfo record = selectByPrimaryKey(studentPoint.getId());
record.setUpdateTime(LocalDateTime.now());
record.setPoint(studentPoint.getPoint());
studentPointInfoMapper.updateByPrimaryKey(record);
return "update OK";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment