Skip to content

Commit

Permalink
Transaction AOP 적용 수정 완료 (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxxtxxyxx authored Oct 4, 2023
1 parent bee637a commit 0a1df99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
import com.livable.server.reservation.repository.ReservationRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.util.*;

@RequiredArgsConstructor
@Service
@Transactional(readOnly = true)
public class ReservationService {

private final ReservationRepository reservationRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public VisitationResponse.Base64QrCode createQrCode(final Long visitorId) {
return VisitationResponse.Base64QrCode.of(base64QrCode);
}

@Transactional
public void validateQrCode(final String qr, final Long visitorId) {
visitationService.validateQrCode(qr);
visitorService.doEntrance(visitorId);
Expand Down

0 comments on commit 0a1df99

Please sign in to comment.