-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] V2 모임 수정 구현 #137
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] V2 모임 수정 구현 #137
Changes from all commits
3812b42
63260b9
c737b79
708534d
7d5cdd4
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,18 +2,54 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import java.util.List; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import team.wego.wegobackend.group.v2.domain.entity.GroupImageV2; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import team.wego.wegobackend.group.v2.domain.entity.GroupImageV2VariantType; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import team.wego.wegobackend.group.v2.domain.entity.ImageV2Format; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public record GroupImageItem( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Long groupImageId, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| String imageKey, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| int sortOrder, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| List<GroupImageVariantItem> variants | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private static final String DEFAULT_100 = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "https://we-go-bucket.s3.ap-northeast-2.amazonaws.com/default/group_logo_100x100.webp"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private static final String DEFAULT_440 = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "https://we-go-bucket.s3.ap-northeast-2.amazonaws.com/default/group_logo_440x240.webp"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public static GroupImageItem from(GroupImageV2 image) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return new GroupImageItem( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image.getId(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image.getImageKey(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image.getSortOrder(), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| image.getVariants().stream().map(GroupImageVariantItem::from).toList() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // DB에 이미지가 0개일 때 내려주는 기본 이미지(440/100) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public static GroupImageItem defaultLogo() { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return new GroupImageItem( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| null, // DB row가 아니다. 그래서 null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "DEFAULT", // 테스트 편하게 DEFAULT로 설정 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 0, // 없으니까 어차피 대표 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+29
to
+34
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // DB에 이미지가 0개일 때 내려주는 기본 이미지(440/100) | |
| public static GroupImageItem defaultLogo() { | |
| return new GroupImageItem( | |
| null, // DB row가 아니다. 그래서 null | |
| "DEFAULT", // 테스트 편하게 DEFAULT로 설정 | |
| 0, // 없으니까 어차피 대표 | |
| // Default images (440/100) returned when there are zero images in the DB | |
| public static GroupImageItem defaultLogo() { | |
| return new GroupImageItem( | |
| null, // Not a DB row, so set to null | |
| "DEFAULT", // Use DEFAULT for easier testing | |
| 0, // 0 indicates the primary image since there are no others |
Copilot
AI
Dec 18, 2025
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.
Comment contains Korean language. The comment "DB에 이미지가 0개일 때 내려주는 기본 이미지(440/100)" should be translated to English for consistency with standard code documentation practices.
| // DB에 이미지가 0개일 때 내려주는 기본 이미지(440/100) | |
| public static GroupImageItem defaultLogo() { | |
| return new GroupImageItem( | |
| null, // DB row가 아니다. 그래서 null | |
| "DEFAULT", // 테스트 편하게 DEFAULT로 설정 | |
| 0, // 없으니까 어차피 대표 | |
| // Default image (440/100) returned when there are 0 images in the DB | |
| public static GroupImageItem defaultLogo() { | |
| return new GroupImageItem( | |
| null, // Not a DB row, therefore null | |
| "DEFAULT", // Set to DEFAULT for easier testing | |
| 0, // 0 because it is the representative image when none exist |
Copilot
AI
Dec 18, 2025
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.
Inconsistent method calls. The code uses getWidth() and getHeight() on lines 39-40 and 47-48, but in the same class on lines 138-148 of GroupV2UpdateService, it uses width() and height() without "get" prefix. Verify that GroupImageV2VariantType enum provides both getWidth()/getHeight() methods, or update these calls to use the correct method name (likely width() and height() based on common enum patterns).
| GroupImageV2VariantType.CARD_440_240.getWidth(), | |
| GroupImageV2VariantType.CARD_440_240.getHeight(), | |
| ImageV2Format.WEBP, | |
| DEFAULT_440 | |
| ), | |
| new GroupImageVariantItem( | |
| null, | |
| GroupImageV2VariantType.THUMBNAIL_100_100, | |
| GroupImageV2VariantType.THUMBNAIL_100_100.getWidth(), | |
| GroupImageV2VariantType.THUMBNAIL_100_100.getHeight(), | |
| GroupImageV2VariantType.CARD_440_240.width(), | |
| GroupImageV2VariantType.CARD_440_240.height(), | |
| ImageV2Format.WEBP, | |
| DEFAULT_440 | |
| ), | |
| new GroupImageVariantItem( | |
| null, | |
| GroupImageV2VariantType.THUMBNAIL_100_100, | |
| GroupImageV2VariantType.THUMBNAIL_100_100.width(), | |
| GroupImageV2VariantType.THUMBNAIL_100_100.height(), |
Copilot
AI
Dec 18, 2025
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.
Inconsistent method calls. The code uses getWidth() and getHeight() on lines 47-48, but in the same class on lines 146-148 of GroupV2UpdateService, it uses width() and height() without "get" prefix. Verify that GroupImageV2VariantType enum provides both getWidth()/getHeight() methods, or update these calls to use the correct method name (likely width() and height() based on common enum patterns).
| GroupImageV2VariantType.CARD_440_240.getWidth(), | |
| GroupImageV2VariantType.CARD_440_240.getHeight(), | |
| ImageV2Format.WEBP, | |
| DEFAULT_440 | |
| ), | |
| new GroupImageVariantItem( | |
| null, | |
| GroupImageV2VariantType.THUMBNAIL_100_100, | |
| GroupImageV2VariantType.THUMBNAIL_100_100.getWidth(), | |
| GroupImageV2VariantType.THUMBNAIL_100_100.getHeight(), | |
| GroupImageV2VariantType.CARD_440_240.width(), | |
| GroupImageV2VariantType.CARD_440_240.height(), | |
| ImageV2Format.WEBP, | |
| DEFAULT_440 | |
| ), | |
| new GroupImageVariantItem( | |
| null, | |
| GroupImageV2VariantType.THUMBNAIL_100_100, | |
| GroupImageV2VariantType.THUMBNAIL_100_100.width(), | |
| GroupImageV2VariantType.THUMBNAIL_100_100.height(), |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||
| package team.wego.wegobackend.group.v2.application.dto.request; | ||||||||||||||||
|
|
||||||||||||||||
| import jakarta.validation.constraints.Size; | ||||||||||||||||
| import java.time.LocalDateTime; | ||||||||||||||||
| import java.util.List; | ||||||||||||||||
| import team.wego.wegobackend.group.v2.domain.entity.GroupV2Status; | ||||||||||||||||
|
|
||||||||||||||||
| /** | ||||||||||||||||
| * | ||||||||||||||||
| * images는 “최종 순서 리스트”로 받자! (0번이 대표) 기존 imageKey + 새 preUploaded imageKey를 섞어서 보내도 OK! 생략(null)이면 | ||||||||||||||||
| * “이미지 변경 없음” 으로 가자 빈 리스트([])면 “이미지 전체 삭제”(정책 허용 시) 하자 | ||||||||||||||||
|
Comment on lines
+9
to
+11
|
||||||||||||||||
| * | |
| * images는 “최종 순서 리스트”로 받자! (0번이 대표) 기존 imageKey + 새 preUploaded imageKey를 섞어서 보내도 OK! 생략(null)이면 | |
| * “이미지 변경 없음” 으로 가자 빈 리스트([])면 “이미지 전체 삭제”(정책 허용 시) 하자 | |
| * images should be provided as the final ordered list (index 0 is the representative image). | |
| * It is allowed to mix existing imageKeys with newly pre-uploaded imageKeys in this list. | |
| * If images is omitted (null), it is treated as "no image changes". If an empty list ([]) is provided, | |
| * it is treated as "delete all images" (when such a policy is allowed). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package team.wego.wegobackend.group.v2.application.dto.response; | ||
|
|
||
|
|
||
| import java.time.LocalDateTime; | ||
| import java.util.List; | ||
| import team.wego.wegobackend.group.v2.application.dto.common.Address; | ||
| import team.wego.wegobackend.group.v2.application.dto.common.GroupImageItem; | ||
| import team.wego.wegobackend.group.v2.domain.entity.GroupV2Status; | ||
|
|
||
| public record UpdateGroupV2Response( | ||
| Long id, | ||
| String title, | ||
| GroupV2Status status, | ||
| Address address, | ||
| LocalDateTime startTime, | ||
| LocalDateTime endTime, | ||
| List<GroupImageItem> images, | ||
| List<String> tags, | ||
| String description, | ||
| int maxParticipants, | ||
| LocalDateTime updatedAt | ||
| ) { } | ||
|
|
||
|
|
Uh oh!
There was an error while loading. Please reload this page.