-
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.
Browse files
Browse the repository at this point in the history
refactor - AuthFacade 관련 코드 리팩토링
- Loading branch information
Showing
18 changed files
with
211 additions
and
109 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
20 changes: 0 additions & 20 deletions
20
src/main/java/sopt/org/hmh/domain/app/repository/ChallengeAppRepository.java
This file was deleted.
Oops, something went wrong.
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
15 changes: 15 additions & 0 deletions
15
...main/java/sopt/org/hmh/domain/app/repository/challenge_app/ChallengeAppJpaRepository.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,15 @@ | ||
package sopt.org.hmh.domain.app.repository.challenge_app; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import sopt.org.hmh.domain.app.domain.ChallengeApp; | ||
|
||
public interface ChallengeAppJpaRepository extends JpaRepository<ChallengeApp, Long> { | ||
|
||
Optional<ChallengeApp> findFirstByChallengeIdAndAppCodeAndOs(Long challengeId, String appCode, String os); | ||
|
||
boolean existsByChallengeIdAndAppCodeAndOs(Long challengeId, String appCode, String os); | ||
|
||
List<ChallengeApp> findAllByChallengeId(Long previousChallengeId); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/sopt/org/hmh/domain/app/repository/challenge_app/ChallengeAppRepository.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 sopt.org.hmh.domain.app.repository.challenge_app; | ||
|
||
import java.util.List; | ||
import sopt.org.hmh.domain.app.domain.ChallengeApp; | ||
import java.util.Optional; | ||
|
||
public interface ChallengeAppRepository { | ||
|
||
void saveAll(List<ChallengeApp> challengeApps); | ||
|
||
void delete(ChallengeApp appToRemove); | ||
|
||
Optional<ChallengeApp> findFirstByChallengeIdAndAppCodeAndOs(Long challengeId, String appCode, String os); | ||
|
||
boolean existsByChallengeIdAndAppCodeAndOs(Long challengeId, String appCode, String os); | ||
|
||
List<ChallengeApp> findAllByChallengeId(Long previousChallengeId); | ||
} |
39 changes: 39 additions & 0 deletions
39
...ain/java/sopt/org/hmh/domain/app/repository/challenge_app/ChallengeAppRepositoryImpl.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,39 @@ | ||
package sopt.org.hmh.domain.app.repository.challenge_app; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Repository; | ||
import sopt.org.hmh.domain.app.domain.ChallengeApp; | ||
|
||
@Repository | ||
@RequiredArgsConstructor | ||
public class ChallengeAppRepositoryImpl implements ChallengeAppRepository{ | ||
|
||
private final ChallengeAppJpaRepository challengeAppJpaRepository; | ||
|
||
@Override | ||
public void saveAll(List<ChallengeApp> challengeApps) { | ||
challengeAppJpaRepository.saveAll(challengeApps); | ||
} | ||
|
||
@Override | ||
public void delete(ChallengeApp appToRemove) { | ||
challengeAppJpaRepository.delete(appToRemove); | ||
} | ||
|
||
@Override | ||
public Optional<ChallengeApp> findFirstByChallengeIdAndAppCodeAndOs(Long challengeId, String appCode, String os) { | ||
return challengeAppJpaRepository.findFirstByChallengeIdAndAppCodeAndOs(challengeId, appCode, os); | ||
} | ||
|
||
@Override | ||
public boolean existsByChallengeIdAndAppCodeAndOs(Long challengeId, String appCode, String os) { | ||
return challengeAppJpaRepository.existsByChallengeIdAndAppCodeAndOs(challengeId, appCode, os); | ||
} | ||
|
||
@Override | ||
public List<ChallengeApp> findAllByChallengeId(Long previousChallengeId) { | ||
return challengeAppJpaRepository.findAllByChallengeId(previousChallengeId); | ||
} | ||
} |
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
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.