Skip to content

Commit

Permalink
fix: course 관련, memberNickname 통일
Browse files Browse the repository at this point in the history
  • Loading branch information
Jo-SeongJeong committed Oct 9, 2024
1 parent d05dfa2 commit ac58d92
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public class UserDetailResponseDto {
private double lat;
private double lng;
private CourseImageDto courseImage;
private String nickname;
private String memberNickname;
private Long memberId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ public class UserListResponseDto {
private double lat;
private double lng;
private CourseImageDto courseImage;
private String nickname;
private String memberNickname;
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public List<UserListResponseDto> findAllUserCourse(double lat, double lng) {
.map(course -> {
// Course -> UserListResponseDto 변환
UserListResponseDto dto = mapper.map(course, UserListResponseDto.class);
dto.setNickname(course.getMember().getNickname());
dto.setMemberNickname((course.getMember().getNickname()));
// calcDistance 함수를 사용해 사용자와 코스 간의 거리 계산
double distance = calcDistance(lat, lng, course.getLat(), course.getLng());

Expand All @@ -89,7 +89,7 @@ public UserDetailResponseDto getUserCourse(Long courseId) {
if(course == null) return null;

UserDetailResponseDto dto = mapper.map(course, UserDetailResponseDto.class);
dto.setNickname(course.getMember().getNickname());
dto.setMemberNickname(course.getMember().getNickname());
dto.setMemberId(course.getMember().getMemberId());
return dto;
}
Expand Down Expand Up @@ -182,7 +182,7 @@ public List<UserListResponseDto> findPopularAllUserCourse(double lat, double lng
.map(course -> {
// Course -> UserListResponseDto 변환
UserListResponseDto dto = mapper.map(course, UserListResponseDto.class);
dto.setNickname(course.getMember().getNickname());
dto.setMemberNickname(course.getMember().getNickname());
// calcDistance 함수를 사용해 사용자와 코스 간의 거리 계산
double distance = calcDistance(lat, lng, course.getLat(), course.getLng());

Expand All @@ -203,7 +203,7 @@ public List<UserListResponseDto> findPopularLatelyUserCourse(double lat, double
.map(course -> {
// Course -> UserListResponseDto 변환
UserListResponseDto dto = mapper.map(course, UserListResponseDto.class);
dto.setNickname(course.getMember().getNickname());
dto.setMemberNickname(course.getMember().getNickname());
// calcDistance 함수를 사용해 사용자와 코스 간의 거리 계산
double distance = calcDistance(lat, lng, course.getLat(), course.getLng());

Expand Down

0 comments on commit ac58d92

Please sign in to comment.