-
Notifications
You must be signed in to change notification settings - Fork 3
[Feat/#423] api 수정 #425
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/#423] api 수정 #425
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -88,6 +88,10 @@ dependencies { | |||||||||||
|
|
||||||||||||
| // | ||||||||||||
| implementation 'org.springframework.boot:spring-boot-starter-actuator' | ||||||||||||
|
|
||||||||||||
| //hibernate | ||||||||||||
| implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | ||||||||||||
| implementation 'org.hibernate.common:hibernate-commons-annotations:6.0.6.Final' | ||||||||||||
|
Comment on lines
+92
to
+94
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. JPA 의존성 중복 선언(앞에서 이미 추가됨) — 정리 필요 이미 26 - //hibernate
- implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
- implementation 'org.hibernate.common:hibernate-commons-annotations:6.0.6.Final'
+ // Hibernate Commons (필요 시에만)
+ implementation 'org.hibernate.common:hibernate-commons-annotations:6.0.6.Final'📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| } | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -48,23 +48,22 @@ public PotMemberAppealResponseDto toDto(PotMember entity) { | |||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| public PotMemberInfoResponseDto toKaKaoCreatorDto(PotMember entity) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| String creatorRole = RoleNameMapper.mapRoleName(entity.getUser().getRole().name()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| String creatorRole = RoleNameMapper.mapRoleName(entity.getRoleName().name()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| String nicknameWithRole = entity.getUser().getNickname() + " " + creatorRole; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| return PotMemberInfoResponseDto.builder() | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| .potMemberId(entity.getPotMemberId()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| .nickname(nicknameWithRole) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| .potRole(entity.getRoleName().name()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| .owner(true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| .owner(entity.isOwner()) // true 고정 대신 실제 owner 여부 반영 추천 | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| .build(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+51
to
59
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. 🛠️ Refactor suggestion toKaKaoCreatorDto: roleName/user 널 가드 추가 권장
- String creatorRole = RoleNameMapper.mapRoleName(entity.getRoleName().name());
- String nicknameWithRole = entity.getUser().getNickname() + " " + creatorRole;
+ String rawRole = entity.getRoleName() != null ? entity.getRoleName().name() : "멤버";
+ String creatorRole = RoleNameMapper.mapRoleName(rawRole);
+ String baseNickname = (entity.getUser() != null) ? entity.getUser().getNickname() : "(알 수 없음)";
+ String nicknameWithRole = baseNickname + " " + creatorRole;
...
- .potRole(entity.getRoleName().name())
- .owner(entity.isOwner()) // true 고정 대신 실제 owner 여부 반영 추천
+ .potRole(rawRole)
+ .owner(entity.isOwner())📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| public PotMemberInfoResponseDto toKaKaoMemberDto(PotMember entity) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| String roleName = entity.getPotApplication() != null | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? entity.getPotApplication().getPotRole().name() | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| String roleName = entity.getRoleName() != null | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ? entity.getRoleName().name() | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| : "멤버"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| String nicknameWithRole; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (entity.getUser() == null || entity.getUser().isDeleted()) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
🛠️ Refactor suggestion
요약과 불일치: Actuator가 제거되지 않았습니다
PR 설명/요약에는 Actuator 제거로 되어 있으나, 현재
spring-boot-starter-actuator가 남아 있습니다. 의도대로라면 삭제하세요.- implementation 'org.springframework.boot:spring-boot-starter-actuator'📝 Committable suggestion
🤖 Prompt for AI Agents