Skip to content

Commit

Permalink
feat: 마이페이지 나의 인증글 - 챌린지 리스트 조회 api 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
daeunkwak committed Sep 8, 2023
1 parent 318314f commit 7e58f1e
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,24 @@ public ResponseEntity<List<MyParticipateChallengeResponseDto>> getMyParticipateC
return ResponseEntity.ok(result);
}

private Boolean isCertifiedToday(Participate participate){
@Tag(name = "challenge", description = "챌린지 API")
@Operation(summary = "내가 참가한 챌린지 리스트 조회 api - 마이페이지 나의 인증글 조회")
@GetMapping("/mypage/participate")
public ResponseEntity<List<MyParticipateChallengeResponseDto>> getMyPageChallenge(@Parameter(hidden = true) @RequestMemberId Long memberId) {

List<Participate> participates = challengeService.getMyParticipateChallenge(memberId);

List<MyParticipateChallengeResponseDto> result = new ArrayList<>();
for(Participate participate : participates){
if(participate.getChallenge().getJudgeStatus().equals(JudgeStatus.COMPLETE)){
result.add(MyParticipateChallengeResponseDto.from(participate.getChallenge(), String.valueOf(participate.getParticipateStatus())));
}
}
return ResponseEntity.ok(result);
}


log.info("localdate 1 ::::: " + LocalDate.now());
private Boolean isCertifiedToday(Participate participate){

for(Certify certify : participate.getCertifies()){
if(certify.getCreatedDate().toLocalDate().equals(LocalDate.now())){
Expand Down

0 comments on commit 7e58f1e

Please sign in to comment.