-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WALWAL-174] raisepet mission supply (#168)
* feature: Mission엔티티에 RaisePet추가 및 미션생성시 RaisePet설정 * feature: RaisePet에 따라 미션제공 * fix: QueryDsl로 변경 * fix: sonarcloud 이슈 수정
- Loading branch information
Showing
15 changed files
with
143 additions
and
49 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
5 changes: 3 additions & 2 deletions
5
src/main/java/com/depromeet/stonebed/domain/mission/dao/mission/MissionRepositoryCustom.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,11 +1,12 @@ | ||
package com.depromeet.stonebed.domain.mission.dao.mission; | ||
|
||
import com.depromeet.stonebed.domain.member.domain.RaisePet; | ||
import com.depromeet.stonebed.domain.mission.domain.Mission; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
public interface MissionRepositoryCustom { | ||
List<Mission> findNotInMissions(List<Mission> missions); | ||
List<Mission> findMissionsAssignedAfterAndByRaisePet(LocalDate assignedDate, RaisePet raisePet); | ||
|
||
List<Mission> findMissionsAssignedAfter(LocalDate assignedDate); | ||
List<Mission> findNotInMissionsAndByRaisePet(List<Mission> missions, RaisePet raisePet); | ||
} |
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
4 changes: 4 additions & 0 deletions
4
.../depromeet/stonebed/domain/mission/dao/missionHistory/MissionHistoryRepositoryCustom.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,12 @@ | ||
package com.depromeet.stonebed.domain.mission.dao.missionHistory; | ||
|
||
import com.depromeet.stonebed.domain.member.domain.RaisePet; | ||
import com.depromeet.stonebed.domain.mission.domain.MissionHistory; | ||
import java.time.LocalDate; | ||
import java.util.Optional; | ||
|
||
public interface MissionHistoryRepositoryCustom { | ||
Optional<MissionHistory> findLatestOneByMissionId(Long missionId); | ||
|
||
Optional<MissionHistory> findByAssignedDateAndRaisePet(LocalDate date, RaisePet raisePet); | ||
} |
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
7 changes: 6 additions & 1 deletion
7
src/main/java/com/depromeet/stonebed/domain/mission/dto/request/MissionCreateRequest.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,9 +1,14 @@ | ||
package com.depromeet.stonebed.domain.mission.dto.request; | ||
|
||
import com.depromeet.stonebed.domain.member.domain.RaisePet; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record MissionCreateRequest( | ||
@Schema(description = "미션 제목", example = "산책하기") | ||
@NotBlank(message = "Title cannot be blank") | ||
String title) {} | ||
String title, | ||
@Schema(description = "반려동물 유형", example = "DOG") | ||
@NotNull(message = "RaisePet cannot be null") | ||
RaisePet raisePet) {} |
7 changes: 6 additions & 1 deletion
7
src/main/java/com/depromeet/stonebed/domain/mission/dto/request/MissionUpdateRequest.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,9 +1,14 @@ | ||
package com.depromeet.stonebed.domain.mission.dto.request; | ||
|
||
import com.depromeet.stonebed.domain.member.domain.RaisePet; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
public record MissionUpdateRequest( | ||
@Schema(description = "미션 제목", example = "산책하기") | ||
@NotBlank(message = "Title cannot be blank") | ||
String title) {} | ||
String title, | ||
@Schema(description = "반려동물 유형", example = "DOG") | ||
@NotNull(message = "RaisePet cannot be null") | ||
RaisePet raisePet) {} |
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.