generated from habinkim/SPRING_BOOT_3_JDK_21_DEMO
-
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.
Merge pull request #66 from Tune-Fun/feature/vote/action
Feature/vote/action
- Loading branch information
Showing
45 changed files
with
648 additions
and
146 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
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
5 changes: 5 additions & 0 deletions
5
src/main/java/com/tune_fun/v1/vote/adapter/output/persistence/VoteCustomRepository.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,9 +1,14 @@ | ||
package com.tune_fun.v1.vote.adapter.output.persistence; | ||
|
||
import com.tune_fun.v1.vote.domain.value.RegisteredVote; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface VoteCustomRepository { | ||
|
||
List<Long> findVoterIdsByVotePaperUuid(final String uuid); | ||
|
||
Optional<RegisteredVote> findByVoterUsernameAndVotePaperId(final String voter, final Long votePaperId); | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,4 @@ | |
|
||
public class VoteCommands { | ||
|
||
public record Register() { | ||
} | ||
|
||
} |
4 changes: 2 additions & 2 deletions
4
src/main/java/com/tune_fun/v1/vote/application/port/input/usecase/RegisterVoteUseCase.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,10 +1,10 @@ | ||
package com.tune_fun.v1.vote.application.port.input.usecase; | ||
|
||
import com.tune_fun.v1.vote.application.port.input.command.VoteCommands; | ||
import org.springframework.security.core.userdetails.User; | ||
|
||
@FunctionalInterface | ||
public interface RegisterVoteUseCase { | ||
|
||
void register(final VoteCommands.Register command); | ||
void register(Long votePaperId, final Long voteChoiceId, User user); | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/tune_fun/v1/vote/application/port/output/LoadVotePort.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,7 +1,12 @@ | ||
package com.tune_fun.v1.vote.application.port.output; | ||
|
||
import com.tune_fun.v1.vote.domain.value.RegisteredVote; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface LoadVotePort { | ||
List<Long> loadVoterIdsByVotePaperUuid(final String uuid); | ||
|
||
Optional<RegisteredVote> loadVoteByVoterAndVotePaperId(final String voter, final Long voteChoiceId); | ||
} |
1 change: 1 addition & 0 deletions
1
src/main/java/com/tune_fun/v1/vote/application/port/output/SaveVotePort.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,4 +1,5 @@ | ||
package com.tune_fun.v1.vote.application.port.output; | ||
|
||
public interface SaveVotePort { | ||
void saveVote(final Long voteChoiceId, final String username); | ||
} |
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
18 changes: 10 additions & 8 deletions
18
src/main/java/com/tune_fun/v1/vote/application/service/RegisterVoteService.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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.