99import lombok .RequiredArgsConstructor ;
1010import org .slf4j .Logger ;
1111import org .slf4j .LoggerFactory ;
12- import org .springframework .scheduling .annotation .Async ;
1312import org .springframework .stereotype .Service ;
1413
1514import java .math .BigDecimal ;
@@ -38,7 +37,6 @@ public void validateEmailConfig() {
3837 }
3938 }
4039
41- @ Async
4240 public void sendWelcomeEmail (User user ) {
4341 try {
4442 emailService .sendWelcomeEmail (user );
@@ -48,7 +46,6 @@ public void sendWelcomeEmail(User user) {
4846 }
4947 }
5048
51- @ Async
5249 public void sendOwnerReservedNotification (Reservation reservation ) {
5350 try {
5451 emailService .sendOwnerReservedNotification (reservation );
@@ -58,7 +55,6 @@ public void sendOwnerReservedNotification(Reservation reservation) {
5855 }
5956 }
6057
61- @ Async
6258 public void sendReservationConfirmationEmail (Reservation reservation , BigDecimal discountAmount ) {
6359 try {
6460 emailService .sendGuestReservationConfirmationEmail (reservation , discountAmount );
@@ -68,7 +64,6 @@ public void sendReservationConfirmationEmail(Reservation reservation, BigDecimal
6864 }
6965 }
7066
71- @ Async
7267 public void sendReservationReminderEmail (Reservation reservation ) {
7368 try {
7469 emailService .sendGuestReservationReminderEmail (reservation );
@@ -78,7 +73,6 @@ public void sendReservationReminderEmail(Reservation reservation) {
7873 }
7974 }
8075
81- @ Async
8276 public void sendOwnerReservationReminderEmail (Reservation reservation ) {
8377 try {
8478 emailService .sendOwnerReservationReminderEmail (reservation );
@@ -88,7 +82,6 @@ public void sendOwnerReservationReminderEmail(Reservation reservation) {
8882 }
8983 }
9084
91- @ Async
9285 public void sendCancellationConfirmationEmail (Reservation reservation ) {
9386 try {
9487 emailService .sendCancellationConfirmationEmail (reservation );
@@ -98,7 +91,6 @@ public void sendCancellationConfirmationEmail(Reservation reservation) {
9891 }
9992 }
10093
101- @ Async
10294 public void sendCancellationByOwnerNotificationEmail (Reservation reservation ) {
10395 try {
10496 emailService .sendCancellationByOwnerNotificationEmail (reservation );
@@ -108,7 +100,6 @@ public void sendCancellationByOwnerNotificationEmail(Reservation reservation) {
108100 }
109101 }
110102
111- @ Async
112103 public void sendCancellationNotificationToOwnerEmail (Reservation reservation ) {
113104 try {
114105 emailService .sendCancellationNotificationToOwnerEmail (reservation );
@@ -118,7 +109,6 @@ public void sendCancellationNotificationToOwnerEmail(Reservation reservation) {
118109 }
119110 }
120111
121- @ Async
122112 public void handleNewReservationEmails (Reservation reservation , BigDecimal discountAmount ) {
123113 logger .info ("Processing emails for new reservation - Guest: {}, Accommodation: {}" ,
124114 reservation .getUser ().getEmail (), reservation .getAccommodation ().getName ());
@@ -129,7 +119,6 @@ public void handleNewReservationEmails(Reservation reservation, BigDecimal disco
129119 logger .info ("New reservation email processing completed" );
130120 }
131121
132- @ Async
133122 public void handleGuestCancellationEmails (Reservation reservation ) {
134123 logger .info ("Processing emails for guest cancellation - Guest: {}, Accommodation: {}" ,
135124 reservation .getUser ().getEmail (), reservation .getAccommodation ().getName ());
@@ -140,7 +129,6 @@ public void handleGuestCancellationEmails(Reservation reservation) {
140129 logger .info ("Guest cancellation email processing completed" );
141130 }
142131
143- @ Async
144132 public void handleOwnerCancellationEmails (Reservation reservation ) {
145133 logger .info ("Processing emails for owner cancellation - Guest: {}, Accommodation: {}" ,
146134 reservation .getUser ().getEmail (), reservation .getAccommodation ().getName ());
@@ -150,7 +138,6 @@ public void handleOwnerCancellationEmails(Reservation reservation) {
150138 logger .info ("Owner cancellation email processing completed" );
151139 }
152140
153- @ Async
154141 public void sendReservationReminders (Reservation reservation ) {
155142 logger .info ("Sending reservation reminders - Guest: {}, Owner: {}, Accommodation: {}" ,
156143 reservation .getUser ().getEmail (), reservation .getAccommodation ().getManagedBy ().getEmail (), reservation .getAccommodation ().getName ());
@@ -192,4 +179,4 @@ public boolean canSendReservationEmails(Reservation reservation) {
192179
193180 return true ;
194181 }
195- }
182+ }
0 commit comments