diff --git a/src/main/java/aromanticcat/umcproject/service/MemberService.java b/src/main/java/aromanticcat/umcproject/service/MemberService.java index d6d9e19..3b04872 100644 --- a/src/main/java/aromanticcat/umcproject/service/MemberService.java +++ b/src/main/java/aromanticcat/umcproject/service/MemberService.java @@ -3,7 +3,9 @@ import aromanticcat.umcproject.entity.Member; import aromanticcat.umcproject.security.SecurityUserDto; import aromanticcat.umcproject.web.dto.Member.MemberRequestDTO; +import aromanticcat.umcproject.web.dto.Member.MemberResponseDTO; +import java.util.List; import java.util.Optional; public interface MemberService { @@ -21,4 +23,6 @@ public interface MemberService { Member updateNickname(String nickname); Member findByMemberId(Long memberId); + + List findMemberList(String userEmail); } diff --git a/src/main/java/aromanticcat/umcproject/service/MemberServiceImpl.java b/src/main/java/aromanticcat/umcproject/service/MemberServiceImpl.java index 4a256d5..911dc28 100644 --- a/src/main/java/aromanticcat/umcproject/service/MemberServiceImpl.java +++ b/src/main/java/aromanticcat/umcproject/service/MemberServiceImpl.java @@ -7,8 +7,13 @@ import aromanticcat.umcproject.security.Role; import aromanticcat.umcproject.security.SecurityUserDto; import aromanticcat.umcproject.security.jwt.JwtAuthFilter; + +import java.util.ArrayList; +import java.util.List; import java.util.Optional; import javax.transaction.Transactional; + +import aromanticcat.umcproject.web.dto.Member.MemberResponseDTO; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -84,4 +89,5 @@ public Member findByMemberId(Long memberId) { Member member = repository.findById(memberId).orElse(null); return member; } + } diff --git a/src/main/java/aromanticcat/umcproject/service/MissionService/MissionCommandServiceImpl.java b/src/main/java/aromanticcat/umcproject/service/MissionService/MissionCommandServiceImpl.java index 4db8874..46017db 100644 --- a/src/main/java/aromanticcat/umcproject/service/MissionService/MissionCommandServiceImpl.java +++ b/src/main/java/aromanticcat/umcproject/service/MissionService/MissionCommandServiceImpl.java @@ -56,22 +56,22 @@ public void stepCompleted(String userEmail, Long missionId) { // 미션 안 } } - @Override - @Transactional - @Scheduled(cron = "0 0 0 * * *") // 매일 자정에 실행되도록 설정 - public void resetDailyMissions() { - - List memberMissions = memberMissionRepository.findAll(); - - for (MemberMission memberMission : memberMissions) { - Mission mission = memberMission.getMission(); - if (mission.isEveryday()) { - memberMission.resetStep(); - memberMission.setMissionStatus(MissionStatus.NOT_STARTED); - // MemberMission 엔티티를 저장하여 변경 사항을 데이터베이스에 반영 - memberMissionRepository.save(memberMission); - } - } - } +// @Override +// @Transactional +// @Scheduled(cron = "0 0 0 * * *") // 매일 자정에 실행되도록 설정 +// public void resetDailyMissions() { +// +// List memberMissions = memberMissionRepository.findAll(); +// +// for (MemberMission memberMission : memberMissions) { +// Mission mission = memberMission.getMission(); +// if (mission.isEveryday()) { +// memberMission.resetStep(); +// memberMission.setMissionStatus(MissionStatus.NOT_STARTED); +// // MemberMission 엔티티를 저장하여 변경 사항을 데이터베이스에 반영 +// memberMissionRepository.save(memberMission); +// } +// } +// } } diff --git a/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java b/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java index adb9194..77b11cb 100644 --- a/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java +++ b/src/main/java/aromanticcat/umcproject/web/controller/FriendController.java @@ -12,6 +12,7 @@ import aromanticcat.umcproject.web.dto.Friend.FriendResponseDTO; import aromanticcat.umcproject.web.dto.Friend.FriendResponseDTO.WaitingFriendDTO; import aromanticcat.umcproject.web.dto.Member.MemberRequestDTO; +import aromanticcat.umcproject.web.dto.Member.MemberResponseDTO; import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; diff --git a/src/main/java/aromanticcat/umcproject/web/dto/Member/MemberResponseDTO.java b/src/main/java/aromanticcat/umcproject/web/dto/Member/MemberResponseDTO.java index 79fac04..7d40fea 100644 --- a/src/main/java/aromanticcat/umcproject/web/dto/Member/MemberResponseDTO.java +++ b/src/main/java/aromanticcat/umcproject/web/dto/Member/MemberResponseDTO.java @@ -1,5 +1,6 @@ package aromanticcat.umcproject.web.dto.Member; +import aromanticcat.umcproject.entity.FriendStatus; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; @@ -25,4 +26,14 @@ public static class MemberJoinResultDTO { public static class MemberNicknameDTO { String nickname; } + + @Getter + @Builder + @AllArgsConstructor + @NoArgsConstructor + public static class MemberInfoDTO{ + + String Name; // 멤버 닉네임 + Long MemberId; // 멤버 우편함 번호 (고유 번호) + } }