-
Notifications
You must be signed in to change notification settings - Fork 2
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
[코드리뷰] #306
base: review
Are you sure you want to change the base?
Conversation
MNG-07(2)
MNG 13 : 미션 설명 강제로 노출시키기
[release] MNG-08, MNG-12, MNG-07, MNG-06, MNG-13
MNG-13 : 미션 확인하기 메서드 수정
MNG-13 test: 개시글 조회 테스트코드 작성
MNG-13 fix: gradle test 오류 수정
[release] MNG-13
MNG-14 fix: 알림 히스토리 전체 조회할 때 모두 읽음 처리
[release] MNG-14, MNG-10, MNG-12
MNG-28 feat: 미션 댓글 생성 시 푸시알림 기능 추가
MNG-28 fix: missionComment path 수정
MNG-28 feat: 푸시 알림 보낼 떼 idInfo에 type 추가
fix: 회원가입시 미션댓글 알림 여부 true로 수정
MNG-28 feat: 푸시알림 보낼 때 idInfo에 tyep 추가 - 2
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.
수고하셨습나다~~~~
testImplementation 'org.springframework.security:spring-security-test' | ||
implementation 'org.springframework:spring-context:5.3.15' | ||
|
||
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.2.2' |
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.
Gradle 형식이 일치하지 않습니다.
다른 곳과 동일하게 조정해주세요.
implementation 'com.squareup.okhttp3:okttp:4.2.2
//log | ||
implementation 'org.springframework.boot:spring-boot-starter-logging' | ||
implementation 'org.springframework.boot:spring-boot-starter-aop' | ||
implementation("org.springframework.boot:spring-boot-starter-actuator") |
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.
전체적인 형식 조정이 필요하겠네요.
@Async | ||
@EventListener | ||
public void onMultiAlarmEvent(MultiFcmEvent event) { | ||
if (event.getIdAndTokensByPush().isPresent() && !event.getIdAndTokensByPush().get().isEmpty()) { |
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.
oneline 으로 넣기에는 가독성이 썩 좋아보이진 않네요.
변수로 분리 가능한 부분이 없을까요?
multiMessageSender.send(new MultiRequest(event.getIdAndTokensByPush().get(), event.getTitle(), event.getBody(), event.getIdInfo(), event.getName(), event.getAlarmType(), event.getPath())); | ||
} | ||
if (event.getIdAndTokensBySave().isPresent() && !event.getIdAndTokensBySave().get().isEmpty()) { | ||
saveMultiAlarmHistoryUseCase.saveAlarmHistories(AlarmHistoryMapper.getMemberIds(event.getIdAndTokensBySave().get()), event.getIdInfo(), event.getTitle(), event.getBody(), event.getName(), event.getAlarmType(), event.getPath()); |
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.
코드 스타일 가이드를 적용했으면 합니다.
https://naver.github.io/hackday-conventions-java/
해당 링크 등의 다양한 스타일 컨벤션을 찾아서, 적용해보셨으면 합니다.
@Getter | ||
public class SignInRequest { | ||
@NotBlank(message="socialToken 을 입력해주세요.") | ||
private String socialToken; |
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.
데이터가 변할 수 있나요?
Setter를 사용할 것이 아니라면, private final
등으로 불변 객체 선언이 나을 듯 합니다.
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.
그렇게 되면 불필요한 @NoArgsConstructor
도 뺄 수 있겠죠.
Member member = memberGetService.getMemberBySocialId(socialId); | ||
Team team = teamGetService.getTeamByTeamId(teamId); | ||
checkLeaderUseCase.validateTeamLeader(member, team); | ||
team.deleteTeam(); |
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.
현재는 데이터 삭제가 완전히 불가능할 것 같고...
장기적으로는 배치로 돌려야겠네요. (유예기간 후 데이터 완전 삭제)
private final BoardGetService boardGetService; | ||
private final TeamMemberGetService teamMemberGetService; | ||
|
||
public GetTeamResponse getTeam(String socialId) { |
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.
장기적으로는....
public GetTeamResponse getTeam(@MoingMember member) {
return teamGetService.getTeamByMember(member);
}
public GetTeamCountResponse getTeamCount(String socialId, Long teamId) { | ||
Member member = memberGetService.getMemberBySocialId(socialId); | ||
GetTeamCountResponse response= teamGetService.getTeamCountAndName(teamId, member.getMemberId()); | ||
response.updateMemberName(member.getNickName()); |
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.
설명한 것 처럼, dto는 최대한 정적 구조를 유지해 주세요.
|
||
String oldProfileImgUrl = team.getProfileImgUrl(); | ||
team.updateTeam( | ||
UpdateUtils.getUpdatedValue(updateTeamRequest.getName(), team.getName()), |
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.
Objects.requireNonNullElse(updateTeamRequest.getName(), team.getName()),
Objects.requireNonNullElse(updateTeamRequest.getIntroduction(), team.getIntroduction()),
Objects.requireNonNullElse(updateTeamRequest.getProfileImgUrl(), team.getProfileImgUrl())
private final MemberGetService memberGetService; | ||
private final TeamGetService teamGetService; | ||
|
||
public DeleteTeamResponse withdrawTeam(String socialId, Long teamId) { |
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.
방어로직이 필요합니다.
소모임장은 해당 API 호출 시 진행할 수 없도록 방지를 해야할 것 같아요.
v.1.0.10
hotfix: 업데이트 푸시알림 + FCM SDK 업데이트
fix: fcm 메시지 전송 실패 로그 출력
No description provided.