Skip to content

Commit

Permalink
fix: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Pleasurecruise committed Nov 14, 2024
1 parent 43296c2 commit 4699292
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public Result update(@RequestBody StudentDTO studentDTO, HttpServletRequest requ
studentDTO.setAvatar(Optional.ofNullable(studentDTO.getAvatar()).orElse(student.getAvatar()));
studentDTO.setSex(Optional.ofNullable(studentDTO.getSex()).orElse(student.getSex()));
studentDTO.setStudentid(Optional.ofNullable(studentDTO.getStudentid()).orElse(student.getStudentid()));

log.info("更新学生信息:{}", studentDTO);
Student updatedStudent = studentService.update(studentDTO);
return Result.success(updatedStudent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ public Student update(StudentDTO studentDTO) {
student.setSex(studentDTO.getSex());
student.setStudentid(studentDTO.getStudentid());
student.setUpdateTime(LocalDateTime.now());
log.info("更新后的学生信息:{}", student);
studentMapper.updateById(student);
}
return student;
Expand Down

0 comments on commit 4699292

Please sign in to comment.