Skip to content

Commit

Permalink
Update StudentServiceImpl.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Pleasurecruise committed Nov 27, 2024
1 parent 0fa02fb commit a5d8f56
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ public Student update(StudentDTO studentDTO) throws Exception {
}

String currentAvatarName = student.getAvatar();
String newAvatarName = studentDTO.getAvatar();
String newAvatarName = extractFileName(studentDTO.getAvatar());
log.info(newAvatarName);
if (!currentAvatarName.equals(newAvatarName) && !student.getAvatar().contains("default.jpg")) {
aliOssUtil.delete(currentAvatarName);
}
Expand Down

0 comments on commit a5d8f56

Please sign in to comment.