-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f39025b
commit b8433e5
Showing
9 changed files
with
104 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
backend/src/main/java/wooteco/prolog/member/application/dto/ProfileResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package wooteco.prolog.member.application.dto; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import wooteco.prolog.member.domain.Member; | ||
import wooteco.prolog.organization.domain.OrganizationGroup; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
public class ProfileResponse { | ||
|
||
private Long id; | ||
private String username; | ||
private String nickname; | ||
private String imageUrl; | ||
private String rssFeedUrl; | ||
private List<String> organizationGroups; | ||
|
||
public static ProfileResponse of(Member member, List<OrganizationGroup> organizationGroups) { | ||
List<String> organizationGroupNames = organizationGroups.stream().map(OrganizationGroup::getName).collect( | ||
Collectors.toList()); | ||
|
||
return new ProfileResponse(member.getId(), member.getUsername(), member.getNickname(), | ||
member.getImageUrl(), member.getRssFeedUrl(), organizationGroupNames); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
.../main/java/wooteco/prolog/organization/domain/repository/OrganizationGroupRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
package wooteco.prolog.organization.domain.repository; | ||
|
||
import java.util.List; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import wooteco.prolog.organization.domain.OrganizationGroup; | ||
|
||
public interface OrganizationGroupRepository extends JpaRepository<OrganizationGroup, Long> { | ||
|
||
List<OrganizationGroup> findByIdInOrderByIdDesc(List<Long> organizationGroupIds); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters