-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature/Inhabas#234] 서비스 테스트 코드 구현 및 리펙토링
- Loading branch information
1 parent
1426dd5
commit 9747ad1
Showing
16 changed files
with
566 additions
and
394 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
20 changes: 18 additions & 2 deletions
20
...e-server/src/main/java/com/inhabas/api/domain/contest/domain/valueObject/ContestType.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,6 +1,22 @@ | ||
package com.inhabas.api.domain.contest.domain.valueObject; | ||
|
||
public enum ContestType { | ||
CONTEST, // 공모전 | ||
ACTIVITY // 대외활동 | ||
CONTEST("contest", 18), | ||
ACTIVITY("activity", 19); | ||
|
||
private final String boardType; | ||
private final int menuId; | ||
|
||
ContestType(String boardType, int menuId) { | ||
this.boardType = boardType; | ||
this.menuId = menuId; | ||
} | ||
|
||
public String getBoardType() { | ||
return boardType; | ||
} | ||
|
||
public int getMenuId() { | ||
return menuId; | ||
} | ||
} |
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
6 changes: 5 additions & 1 deletion
6
...src/main/java/com/inhabas/api/domain/contest/repository/ContestBoardRepositoryCustom.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,12 +1,16 @@ | ||
package com.inhabas.api.domain.contest.repository; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
import com.inhabas.api.domain.contest.domain.ContestBoard; | ||
import com.inhabas.api.domain.contest.domain.valueObject.ContestType; | ||
import com.inhabas.api.domain.contest.dto.ContestBoardDto; | ||
|
||
public interface ContestBoardRepositoryCustom { | ||
|
||
List<ContestBoard> findAllByContestTypeAndFieldLike( | ||
List<ContestBoardDto> findAllByTypeAndFieldAndSearch( | ||
ContestType contestType, Long contestFieldId, String search, String sortBy); | ||
|
||
public Optional<ContestBoard> findByTypeAndId(ContestType contestType, Long boardId); | ||
} |
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
Oops, something went wrong.