We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9ae6f4 + aec638e commit 6889111Copy full SHA for 6889111
backend/pirocheck/src/main/java/backend/pirocheck/Attendance/service/AttendanceService.java
@@ -297,8 +297,14 @@ public boolean deleteAttendance(Long attendanceId) {
297
if (attendanceOpt.isEmpty()) {
298
return false;
299
}
300
-
301
- attendanceRepository.delete(attendanceOpt.get());
+
+ Attendance attendance = attendanceOpt.get(); // 변수로 저장
302
+ Long userId = attendance.getUser().getId();
303
304
+ attendanceRepository.delete(attendance);
305
306
+ // 출석 삭제 후 보증금 재계산
307
+ depositService.recalculateDeposit(userId);
308
return true;
309
310
0 commit comments