Closed ryuseunghan closed 5 months ago
@Transactional public void updateLocation(LocationRequest locationRequest, Member member){ member.updateLocation(locationRequest.getLocation()); }
이때 현재 프론트에서 Location을 받는 뷰 부분이 미완이므로 Location이 null일때 예외처리 추가
public Slice<NungilSliceResponse> getNungilSliceByMemberAndStatus(Member member, NungilStatus status, int page, int size) { ,,, List<NungilSliceResponse> nungilResponses = nungilSlice.getContent().stream() .filter(nungil -> nungil.getStatus() != NungilStatus.RECOMMENDED || member.getLocation().equals(nungil.getReceiver().getLocation()) && member.getLocation() != null && nungil.getReceiver().getLocation() != null) .map(nungil -> NungilSliceResponse.create(nungil, nungil.getReceiver())) .collect(Collectors.toList()); if (member.getLocation() == null || nungilSlice.getContent().stream() .anyMatch(nungil -> member.getLocation() == null || nungil.getReceiver().getLocation() == null)) { throw new GeneralException(MemberErrorResult.Location_Not_Found); } ,,, }
🔥 Related Issues
💜 작업 내용
✅ PR Point
이때 현재 프론트에서 Location을 받는 뷰 부분이 미완이므로 Location이 null일때 예외처리 추가