-
Notifications
You must be signed in to change notification settings - Fork 5
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
1 parent
f3e1a5b
commit f75e712
Showing
2 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/main/java/com/readyvery/readyverydemo/src/store/StoreServiceFacade.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,21 @@ | ||
package com.readyvery.readyverydemo.src.store; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
import com.readyvery.readyverydemo.domain.Store; | ||
import com.readyvery.readyverydemo.domain.repository.StoreRepository; | ||
import com.readyvery.readyverydemo.global.exception.BusinessLogicException; | ||
import com.readyvery.readyverydemo.global.exception.ExceptionCode; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class StoreServiceFacade { | ||
private final StoreRepository storeRepository; | ||
|
||
public Store getStoreById(Long storeId) { | ||
return storeRepository.findById(storeId) | ||
.orElseThrow(() -> new BusinessLogicException(ExceptionCode.STORE_NOT_FOUND)); | ||
} | ||
} |
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