-
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 #54 from KOA-TF/develop
Develop to main
- Loading branch information
Showing
64 changed files
with
1,053 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
55 changes: 55 additions & 0 deletions
55
api-module/src/main/java/com/koa/apimodule/command/api/VoteController.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,55 @@ | ||
package com.koa.apimodule.command.api; | ||
|
||
import com.koa.commonmodule.common.ApplicationResponse; | ||
import com.koa.coremodule.vote.application.dto.VoteRequest; | ||
import com.koa.coremodule.vote.application.dto.VoteStatus; | ||
import com.koa.coremodule.vote.application.service.VoteFindUseCase; | ||
import com.koa.coremodule.vote.application.service.VoteSaveUseCase; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/v1/vote") | ||
public class VoteController { | ||
|
||
private final VoteSaveUseCase voteSaveUseCase; | ||
private final VoteFindUseCase voteFindUseCase; | ||
|
||
/** | ||
* 투표 생성 | ||
*/ | ||
@PostMapping | ||
public ApplicationResponse<Long> makeVote(@RequestBody VoteRequest voteRequest) { | ||
|
||
Long voteId = voteSaveUseCase.saveVote(voteRequest); | ||
return ApplicationResponse.ok(voteId, "투표 생성을 완료했습니다."); | ||
} | ||
|
||
/** | ||
* 투표 현황 조회 - 명단까지 리스트로 전달 필요 | ||
*/ | ||
@GetMapping | ||
public ApplicationResponse<VoteStatus> getVoteStatus(Long noticeId) { | ||
|
||
VoteStatus voteStatus = voteFindUseCase.findVoteStatus(noticeId); | ||
return ApplicationResponse.ok(voteStatus, "투표 현황 조회 완료했습니다."); | ||
} | ||
|
||
/** | ||
* 투표 참여 | ||
*/ | ||
@PostMapping(value = "/attend") | ||
public ApplicationResponse<Long> attendVote(Long voteItemId) { | ||
|
||
Long voteItemRecordId = voteSaveUseCase.attendVote(voteItemId); | ||
return ApplicationResponse.ok(voteItemRecordId, "투표 참여를 완료했습니다."); | ||
} | ||
|
||
/** | ||
* 투표 마감 처리 | ||
*/ | ||
|
||
} |
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 |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
@NoArgsConstructor | ||
public class CommentCreateRequest { | ||
private String content; | ||
private Boolean isAnonymous; | ||
} |
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
Oops, something went wrong.