-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
86 additions
and
2 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
10 changes: 10 additions & 0 deletions
10
...ommon/src/main/java/com/depromeet/oversweet/exception/record/NotFoundRecordException.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,10 @@ | ||
package com.depromeet.oversweet.exception.record; | ||
|
||
import com.depromeet.oversweet.exception.ErrorCode; | ||
import com.depromeet.oversweet.exception.OverSweetException; | ||
|
||
public class NotFoundRecordException extends OverSweetException { | ||
public NotFoundRecordException(ErrorCode errorCode) { | ||
super(errorCode); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...rc/main/java/com/depromeet/oversweet/domain/record/repository/DeleteRecordRepository.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.depromeet.oversweet.domain.record.repository; | ||
|
||
public interface DeleteRecordRepository { | ||
void deleteRecordByMemberIdAndDrinkId(Long memberId, Long drinkId); | ||
} |
18 changes: 18 additions & 0 deletions
18
...ain/java/com/depromeet/oversweet/domain/record/repository/DeleteRecordRepositoryImpl.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,18 @@ | ||
package com.depromeet.oversweet.domain.record.repository; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Repository; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Repository | ||
@RequiredArgsConstructor | ||
public class DeleteRecordRepositoryImpl implements DeleteRecordRepository{ | ||
|
||
private final RecordJpaRepository recordJpaRepository; | ||
|
||
@Override | ||
@Transactional | ||
public void deleteRecordByMemberIdAndDrinkId(final Long memberId, final Long drinkId) { | ||
recordJpaRepository.deleteByMemberIdAndDrinkId(memberId, drinkId); | ||
} | ||
} |
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