Skip to content

Commit

Permalink
[Fix] 메서드 레퍼런스 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
eunki96 committed Dec 1, 2023
1 parent db66331 commit 7216404
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions favor/src/main/java/com/favor/favor/user/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,22 +143,22 @@ public List<GiftSimpleDto> readGiftList(Long userNo) {
User user = findUserByUserNo(userNo);

return giftRepository.findGiftsByUser(user).stream()
.map(GiftSimpleDto::new).collect(Collectors.toList());
.map(GiftSimpleDto::from).collect(Collectors.toList());
}

public List<GiftSimpleDto> readGiftListByName(Long userNo, String giftName){
User user = findUserByUserNo(userNo);

return giftRepository.findGiftsByUserAndGiftNameContains(user, giftName).stream()
.map(GiftSimpleDto::new).collect(Collectors.toList());
.map(GiftSimpleDto::from).collect(Collectors.toList());
}

public List<GiftSimpleDto> readGiftListByCategory(Long userNo, GiftCategory giftCategory){
User user = findUserByUserNo(userNo);
Integer categoryNo = giftCategory.getType();

return giftRepository.findGiftsByUserAndCategory(user, categoryNo).stream()
.map(GiftSimpleDto::new)
.map(GiftSimpleDto::from)
.collect(Collectors.toList());
}

Expand All @@ -167,7 +167,7 @@ public List<GiftSimpleDto> readGiftListByEmotion(Long userNo, Emotion emotion){
Integer emotionNo = emotion.getType();

return giftRepository.findGiftsByUserAndEmotion(user, emotionNo).stream()
.map(GiftSimpleDto::new)
.map(GiftSimpleDto::from)
.collect(Collectors.toList());
}

Expand Down Expand Up @@ -265,14 +265,14 @@ public List<Reminder> readReminderListByMonthAndYear(int year, int month){
public List<GiftSimpleDto> readGivenGiftList(Long userNo){
User user = findUserByUserNo(userNo);
return giftRepository.findGiftsByUser(user).stream()
.map(GiftSimpleDto::new)
.map(GiftSimpleDto::from)
.collect(Collectors.toList());
}

public List<GiftSimpleDto> readReceivedGiftList(Long userNo){
User user = findUserByUserNo(userNo);
return giftRepository.findGiftsByUser(user).stream()
.map(GiftSimpleDto::new)
.map(GiftSimpleDto::from)
.collect(Collectors.toList());
}

Expand Down

0 comments on commit 7216404

Please sign in to comment.