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

update 成绩更新时出bug

parent cbb28cd6
...@@ -108,10 +108,19 @@ public class StudentPointService { ...@@ -108,10 +108,19 @@ public class StudentPointService {
return "add OK"; 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) { public Object updatePoint(StudentPointInfo studentPoint) {
LocalDateTime now = LocalDateTime.now(); StudentPointInfo record = selectByPrimaryKey(studentPoint.getId());
studentPoint.setUpdateTime(now); record.setUpdateTime(LocalDateTime.now());
studentPointInfoMapper.updateByPrimaryKey(studentPoint); record.setPoint(studentPoint.getPoint());
studentPointInfoMapper.updateByPrimaryKey(record);
return "update OK"; 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