Skip to content

Commit

Permalink
[MODIFY] 모든 파트 가져오기 기능에서 joinableParts 필드가 한글로 반환되도록 수정 (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh authored Nov 28, 2024
2 parents 91d2a14 + 1aca8cc commit 536704f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public record CrewMeeting(
MeetingStatus status,
String imageUrl,
String category,
List<String> joinableParts,
List<CrewPart> joinableParts,
Boolean isBlockedMeeting
){

Expand Down
18 changes: 18 additions & 0 deletions src/main/java/org/sopt/app/application/meeting/CrewPart.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.sopt.app.application.meeting;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum CrewPart {
PM("기획"),
DESIGN("디자인"),
WEB("웹"),
IOS("iOS"),
ANDROID("Android"),
SERVER("서버")
;

private final String partName;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ public static MeetingResponse of(final CrewMeeting crewMeeting) {
.title(crewMeeting.title())
.category(crewMeeting.category())
.canJoinOnlyActiveGeneration(crewMeeting.canJoinOnlyActiveGeneration())
.joinableParts(crewMeeting.joinableParts())
.joinableParts(convertToExposedPartName(crewMeeting.joinableParts()))
.canJoinAllParts(crewMeeting.joinableParts().size() == Part.values().length)
.status(crewMeeting.status())
.imageUrl(crewMeeting.imageUrl())
.build();
}

private static List<String> convertToExposedPartName(List<CrewPart> crewPart) {
return crewPart.stream().map(CrewPart::getPartName).toList();
}
}
7 changes: 2 additions & 5 deletions src/main/java/org/sopt/app/facade/HomeFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@
import org.sopt.app.application.playground.PlaygroundAuthService;
import org.sopt.app.domain.entity.User;
import org.sopt.app.domain.enums.UserStatus;
import org.sopt.app.presentation.home.response.HomeDescriptionResponse;
import org.sopt.app.presentation.home.response.*;
import org.sopt.app.presentation.home.MeetingParamRequest;
import org.sopt.app.presentation.home.response.CoffeeChatResponse;
import org.sopt.app.presentation.home.response.RecentPostsResponse;
import org.sopt.app.presentation.home.response.EmploymentPostResponse;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand Down Expand Up @@ -50,7 +47,7 @@ public HomeDescriptionResponse getHomeMainDescription(User user) {
calculator.getActivityDuration()
);
}

@Transactional(readOnly = true)
public List<AppServiceEntryStatusResponse> checkAppServiceEntryStatus(User user) {

return appServiceService.getAllAppService().stream()
Expand Down

0 comments on commit 536704f

Please sign in to comment.