-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Chore : Home 화면 관련 예외처리 추가 * Chore : Home 화면 관련 비지니스 로직 수정, 의존성 관리 * Chore : 엔티티 컬럼명 수정 writer -> member * Chore : Jwt 관련 예외 처리 로직 추가
- Loading branch information
1 parent
f0ea957
commit bf2c8f8
Showing
13 changed files
with
227 additions
and
90 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
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
33 changes: 8 additions & 25 deletions
33
src/main/java/com/gdsc/petwalk/domain/walkinvitation/dto/response/HomePageResponseDto.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,48 +1,31 @@ | ||
package com.gdsc.petwalk.domain.walkinvitation.dto.response; | ||
|
||
import com.gdsc.petwalk.domain.walkinvitation.entity.WalkInvitation; | ||
import com.gdsc.petwalk.domain.walkinvitation.entity.WalkingStatus; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
|
||
@Data | ||
public class HomePageResponseDto { | ||
private Long id; // 글 id | ||
private String title; | ||
private double latitude; // 산책 위치 위도 | ||
private double longitude; // 산책 위치 경도 | ||
private String detailedLocation; // 세부 위치 | ||
private LocalDateTime walkDateTime; | ||
private String walkingStatus; // 산책 상태 | ||
|
||
private String walkDateTime; | ||
private WalkingStatus walkingStatus; // 산책 상태 | ||
private String walkInvitationPhotoUrl; // 썸네일 | ||
private String timeDifference; // 몇분 전 올라온 글인지 | ||
|
||
@Builder | ||
public HomePageResponseDto(String title, double latitude, double longitude, String detailedLocation, LocalDateTime walkDateTime, String walkingStatus, String walkInvitationPhotoUrl) { | ||
public HomePageResponseDto(Long id, String title, double latitude, double longitude, String detailedLocation, String walkDateTime, WalkingStatus walkingStatus, String walkInvitationPhotoUrl, String timeDifference) { | ||
this.id = id; | ||
this.title = title; | ||
this.latitude = latitude; | ||
this.longitude = longitude; | ||
this.detailedLocation = detailedLocation; | ||
this.walkDateTime = walkDateTime; | ||
this.walkingStatus = walkingStatus; | ||
this.walkInvitationPhotoUrl = walkInvitationPhotoUrl; | ||
} | ||
|
||
|
||
public static List<HomePageResponseDto> getListFrom(List<WalkInvitation> walkInvitations) { | ||
|
||
return walkInvitations.stream().map(walkInvitation -> { | ||
return HomePageResponseDto.builder() | ||
.title(walkInvitation.getTitle()) | ||
.latitude(walkInvitation.getLatitude()) | ||
.longitude(walkInvitation.getLongitude()) | ||
.detailedLocation(walkInvitation.getDetailedLocation()) | ||
.walkDateTime(walkInvitation.getWalkStartDateTime()) | ||
.walkingStatus(walkInvitation.getWalkingStatus()) | ||
// .walkInvitationPhotoUrl(walkInvitation.getPhotoUrls().get(0).getPhotoUrl()) | ||
.walkInvitationPhotoUrl(null) | ||
.build(); | ||
}).toList(); | ||
this.timeDifference = timeDifference; | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
...ain/java/com/gdsc/petwalk/domain/walkinvitation/dto/response/WalkInvitationResultDto.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,15 @@ | ||
package com.gdsc.petwalk.domain.walkinvitation.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
public class WalkInvitationResultDto<T> { | ||
private Boolean status; | ||
private int code; | ||
private String message; | ||
private T data; | ||
} |
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
5 changes: 5 additions & 0 deletions
5
src/main/java/com/gdsc/petwalk/domain/walkinvitation/entity/WalkingStatus.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,5 @@ | ||
package com.gdsc.petwalk.domain.walkinvitation.entity; | ||
|
||
public enum WalkingStatus { | ||
BEFORE_WALK, DURING_WALK, AFTER_WALK | ||
} |
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
Oops, something went wrong.