-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] 동행 성사 메일 알림 기능을 구현한다. #160
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
eb610a8
fix : 게시글 삭제 기능 수정
ParkIsComing 4a1720a
fix : MyCommentResDto 값 수정
ParkIsComing f50810a
fix : MyCommentResDto 값 수정
ParkIsComing 3a2c9ff
Merge branch 'feature/8-community' of https://github.com/KUDDY-2023/K…
ParkIsComing c764dc0
feat : 동행 성사 메일 알림 기능 구현
ParkIsComing 06bb7dd
Merge branch 'develop' into feature/8-community
ParkIsComing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
api-server/src/main/java/com/kuddy/apiserver/meetup/MeetUpPayedEventListener.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,7 @@ | |
import com.kuddy.common.member.domain.ProviderType; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.security.access.prepost.PreAuthorize; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PutMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import com.kuddy.apiserver.meetup.dto.MeetupListResDto; | ||
import com.kuddy.common.meetup.domain.Meetup; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 코드 패치는 어떤 리팩토링 작업인가요? |
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
api-server/src/main/java/com/kuddy/apiserver/notification/service/MeeupNotiService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.kuddy.apiserver.notification.service; | ||
|
||
import com.kuddy.common.meetup.domain.Meetup; | ||
import com.kuddy.common.meetup.exception.MeetupNotFoundException; | ||
import com.kuddy.common.meetup.repository.MeetupRepository; | ||
import com.kuddy.common.member.domain.Member; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
import javax.mail.MessagingException; | ||
import javax.transaction.Transactional; | ||
|
||
@Service | ||
@Transactional | ||
@RequiredArgsConstructor | ||
public class MeeupNotiService { | ||
private final MeetupRepository meetupRepository; | ||
private final MailNotiService mailNotiService; | ||
|
||
public void pubishMeetupPayedEvent(String chatId) throws MessagingException { | ||
Meetup meetup = meetupRepository.findByChatId(chatId).orElseThrow(MeetupNotFoundException::new); | ||
Member kuddy = meetup.getKuddy(); | ||
Member traveler = meetup.getTraveler(); | ||
mailNotiService.sendMeetupPayedMail(kuddy.getEmail(), traveler.getEmail(), kuddy.getNickname(), traveler.getNickname()); | ||
} | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 코드 패치는
MyCommentResDto
클래스에 새로운 필드인isJoinus
를 추가하는 것으로 보입니다.이 코드의 주된 문제는 중복된 필드
isJoinus
가 두 번 선언되었다는 점입니다. 이러한 유형의 중복은 충돌을 일으킬 수 있으며 코드의 가독성과 유지 보수성을 저해할 수 있습니다. 따라서 한 번만 선언되도록 수정하는 것이 좋습니다.또한, 코드에서 사용되는 변수들에 대한 주석이나 설명이 없습니다. 다른 개발자들이 코드를 이해하기 어려울 수 있으므로 명확한 설명을 추가하는 것이 좋습니다.
마지막으로, 코드에서 어디에 사용되는지 확인할 수 없는
id
,postType
,postTitle
,createdDate
변수들이 선언되어 있습니다. 필요한 경우 해당 변수들에 대한 사용처를 추가하거나 제거하는 것이 좋습니다.이러한 수정 사항을 고려하여 코드를 개선하실 수 있을 것입니다.