-
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: 필요없는 로그 코드 삭제 * chore: 모든 템플릿 조회 FormType으로 변경 * chore: 기본 템플릿 아이디 리스트 삭제 * chore: application-dev 수정
- Loading branch information
Showing
2 changed files
with
10 additions
and
7 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
9 changes: 7 additions & 2 deletions
9
layer-domain/src/main/java/org/layer/domain/form/repository/FormRepository.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,16 +1,21 @@ | ||
package org.layer.domain.form.repository; | ||
|
||
import static org.layer.common.exception.FormExceptionType.*; | ||
|
||
import org.layer.domain.form.entity.Form; | ||
import org.layer.domain.form.entity.FormType; | ||
import org.layer.domain.form.exception.FormException; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
import static org.layer.common.exception.FormExceptionType.NOT_FOUND_FORM; | ||
|
||
public interface FormRepository extends JpaRepository<Form, Long> { | ||
default Form findByIdOrThrow(Long formId) { | ||
return findById(formId) | ||
.orElseThrow(() -> new FormException(NOT_FOUND_FORM)); | ||
} | ||
|
||
List<Form> findByFormTypeOrderById(FormType formType); | ||
|
||
|
||
} |