Skip to content
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

[MODIFY] 모든 파트 가져오기 기능에서 joinableParts 필드가 한글로 반환되도록 수정 #461

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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