From 576f32d7f423adb50a7fabf96dd908b3d39fb828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=20=EC=8A=B9=20=EC=97=B0?= <53565255+seungyeonnnnnni@users.noreply.github.com> Date: Wed, 6 Dec 2023 23:36:02 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix=20:=20=EB=AF=B8=EC=85=98=20=EB=A6=AC?= =?UTF-8?q?=EB=A7=88=EC=9D=B8=EB=93=9C=20=EC=95=8C=EB=A6=BC=20=EB=B0=9C?= =?UTF-8?q?=EC=86=A1=20=EA=B5=AC=ED=98=84=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/MissionRemindAlarmUseCase.java | 32 +++++++++++-------- .../domain/mission/domain/entity/Mission.java | 4 +++ .../dto/res/MissionArchiveRes.java | 2 ++ .../domain/entity/MissionArchive.java | 2 +- .../MissionArchiveCustomRepository.java | 4 +++ .../MissionArchiveCustomRepositoryImpl.java | 27 ++++++++++++++++ .../repository/MissionArchiveRepository.java | 2 ++ .../MissionArchiveScheduleQueryService.java | 25 +++++++++++++++ .../domain/entity/MissionState.java | 2 +- .../fcm/constant/RemindMissionTitle.java | 14 ++++---- ...issionArchiveCustomRepositoryImplTest.java | 29 +++++++++++++++++ 11 files changed, 120 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/moing/backend/domain/missionArchive/domain/service/MissionArchiveScheduleQueryService.java create mode 100644 src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java diff --git a/src/main/java/com/moing/backend/domain/mission/application/service/MissionRemindAlarmUseCase.java b/src/main/java/com/moing/backend/domain/mission/application/service/MissionRemindAlarmUseCase.java index 61fb3d1e..1e651bdd 100644 --- a/src/main/java/com/moing/backend/domain/mission/application/service/MissionRemindAlarmUseCase.java +++ b/src/main/java/com/moing/backend/domain/mission/application/service/MissionRemindAlarmUseCase.java @@ -22,40 +22,44 @@ public class MissionRemindAlarmUseCase { public void sendRemindMissionAlarm(Mission mission) { + + Random random = new Random(System.currentTimeMillis()); - String title = getTitle("receiver",random.nextInt(4)); - String message = getMessage(mission.getTitle(),random.nextInt(4)); + + + String title = getTitle(random.nextInt(4)); + String message = getMessage(random.nextInt(4)); MultiRequest multiRequest = new MultiRequest(); } - public String getTitle(String receiver, int num) { + public String getTitle(int num) { switch (num) { case 0: - return receiver + REMIND_MISSION_TITLE1.getMessage(); + return REMIND_MISSION_TITLE1.getMessage(); case 1: - return receiver + REMIND_MISSION_TITLE2.getMessage(); + return REMIND_MISSION_TITLE2.getMessage(); case 2: - return receiver + REMIND_MISSION_TITLE3.getMessage(); + return REMIND_MISSION_TITLE3.getMessage(); case 3: - return receiver + REMIND_MISSION_TITLE4.getMessage(); + return REMIND_MISSION_TITLE4.getMessage(); } - return receiver + REMIND_MISSION_TITLE4.getMessage(); + return REMIND_MISSION_TITLE4.getMessage(); } - public String getMessage(String missionTitle, int num) { + public String getMessage(int num) { switch (num) { case 0: - return missionTitle + REMIND_MISSION_MESSAGE1.getMessage(); + return REMIND_MISSION_MESSAGE1.getMessage(); case 1: - return missionTitle + REMIND_MISSION_MESSAGE2.getMessage(); + return REMIND_MISSION_MESSAGE2.getMessage(); case 2: - return missionTitle + REMIND_MISSION_MESSAGE3.getMessage(); + return REMIND_MISSION_MESSAGE3.getMessage(); case 3: - return missionTitle + REMIND_MISSION_MESSAGE4.getMessage(); + return REMIND_MISSION_MESSAGE4.getMessage(); } - return missionTitle + REMIND_MISSION_MESSAGE4.getMessage(); + return REMIND_MISSION_MESSAGE4.getMessage(); } diff --git a/src/main/java/com/moing/backend/domain/mission/domain/entity/Mission.java b/src/main/java/com/moing/backend/domain/mission/domain/entity/Mission.java index df199e4a..44384433 100644 --- a/src/main/java/com/moing/backend/domain/mission/domain/entity/Mission.java +++ b/src/main/java/com/moing/backend/domain/mission/domain/entity/Mission.java @@ -5,6 +5,7 @@ import com.moing.backend.domain.mission.domain.entity.constant.MissionType; import com.moing.backend.domain.mission.domain.entity.constant.MissionWay; import com.moing.backend.domain.missionArchive.domain.entity.MissionArchive; +import com.moing.backend.domain.missionState.domain.entity.MissionState; import com.moing.backend.domain.team.domain.entity.Team; import com.moing.backend.global.entity.BaseTimeEntity; import lombok.AllArgsConstructor; @@ -49,6 +50,9 @@ public class Mission extends BaseTimeEntity { @OneToMany(mappedBy = "mission") List missionArchiveList = new ArrayList<>(); + + @OneToMany(mappedBy = "mission") + List missionStateList = new ArrayList<>(); @Builder public Mission(String title, LocalDateTime dueTo, String rule, String content, int number, Team team, MissionType type, MissionStatus status, MissionWay way) { diff --git a/src/main/java/com/moing/backend/domain/missionArchive/application/dto/res/MissionArchiveRes.java b/src/main/java/com/moing/backend/domain/missionArchive/application/dto/res/MissionArchiveRes.java index b154c6ce..31c9b26f 100644 --- a/src/main/java/com/moing/backend/domain/missionArchive/application/dto/res/MissionArchiveRes.java +++ b/src/main/java/com/moing/backend/domain/missionArchive/application/dto/res/MissionArchiveRes.java @@ -19,6 +19,8 @@ public class MissionArchiveRes { private String heartStatus; private Long hearts; + private boolean isAbleToEdit; + } diff --git a/src/main/java/com/moing/backend/domain/missionArchive/domain/entity/MissionArchive.java b/src/main/java/com/moing/backend/domain/missionArchive/domain/entity/MissionArchive.java index 670adbec..abf8cae3 100644 --- a/src/main/java/com/moing/backend/domain/missionArchive/domain/entity/MissionArchive.java +++ b/src/main/java/com/moing/backend/domain/missionArchive/domain/entity/MissionArchive.java @@ -39,7 +39,7 @@ public class MissionArchive extends BaseTimeEntity { // 1회 미션을 저장 @Enumerated(value = EnumType.STRING) private MissionArchiveStatus status; - @Column(nullable = false, length = 4000) + @Column(nullable = false, length = 5000) private String archive; //링크, 글, 사진 뭐든 가능 private Long count; // 횟수 diff --git a/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepository.java b/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepository.java index 1818b2ed..0a393d16 100644 --- a/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepository.java +++ b/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepository.java @@ -1,5 +1,6 @@ package com.moing.backend.domain.missionArchive.domain.repository; +import com.moing.backend.domain.member.domain.entity.Member; import com.moing.backend.domain.mission.application.dto.res.FinishMissionBoardRes; import com.moing.backend.domain.mission.application.dto.res.RepeatMissionBoardRes; import com.moing.backend.domain.mission.application.dto.res.SingleMissionBoardRes; @@ -30,4 +31,7 @@ public interface MissionArchiveCustomRepository { Boolean findMyArchivesToday(Long memberId,Long missionId); + Optional> findPeopleRemainMission(); + + } diff --git a/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImpl.java b/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImpl.java index 293ec640..db04e918 100644 --- a/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImpl.java +++ b/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImpl.java @@ -1,5 +1,6 @@ package com.moing.backend.domain.missionArchive.domain.repository; +import com.moing.backend.domain.member.domain.entity.Member; import com.moing.backend.domain.mission.application.dto.res.FinishMissionBoardRes; import com.moing.backend.domain.mission.application.dto.res.RepeatMissionBoardRes; import com.moing.backend.domain.mission.application.dto.res.SingleMissionBoardRes; @@ -22,6 +23,7 @@ import org.springframework.data.jpa.repository.Query; import javax.persistence.EntityManager; +import javax.swing.text.html.Option; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; @@ -30,7 +32,11 @@ import static com.moing.backend.domain.mission.domain.entity.QMission.mission; import static com.moing.backend.domain.missionArchive.domain.entity.QMissionArchive.*; import static com.moing.backend.domain.missionState.domain.entity.QMissionState.missionState; +import static com.moing.backend.domain.team.domain.entity.QTeam.team; +import static com.moing.backend.domain.teamMember.domain.entity.QTeamMember.teamMember; import static javax.swing.Spring.constant; +import static org.springframework.data.jpa.domain.Specification.where; + @Slf4j public class MissionArchiveCustomRepositoryImpl implements MissionArchiveCustomRepository { @@ -277,5 +283,26 @@ public Boolean findMyArchivesToday(Long memberId, Long missionId) { } + public Optional> findPeopleRemainMission() { + return Optional.ofNullable(queryFactory + .select(teamMember.member.nickName).distinct() + .from(teamMember) + .join(teamMember.team, team) + .join(team.missions, mission) + .join(mission.missionStateList,missionState) + .where(missionState.isNull()) + .fetch()); +// .where( +// // active 한 미션 필터링 +// (((mission.status.eq(MissionStatus.ONGOING).or(mission.status.eq(MissionStatus.WAIT))).and(mission.type.eq(MissionType.ONCE))) +// .or((mission.status.eq(MissionStatus.ONGOING)).and(mission.type.eq(MissionType.REPEAT)))), +// // 인증하지 않은값 +// missionState.id.isNull() + + +// ).fetch()); + } + + } diff --git a/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveRepository.java b/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveRepository.java index 804a5b01..4b6065b5 100644 --- a/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveRepository.java +++ b/src/main/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveRepository.java @@ -7,10 +7,12 @@ import org.hibernate.annotations.Parameter; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; +@Repository public interface MissionArchiveRepository extends JpaRepository,MissionArchiveCustomRepository { @Query("select m from MissionArchive as m where m.member =:memberId" ) diff --git a/src/main/java/com/moing/backend/domain/missionArchive/domain/service/MissionArchiveScheduleQueryService.java b/src/main/java/com/moing/backend/domain/missionArchive/domain/service/MissionArchiveScheduleQueryService.java new file mode 100644 index 00000000..e2f8585c --- /dev/null +++ b/src/main/java/com/moing/backend/domain/missionArchive/domain/service/MissionArchiveScheduleQueryService.java @@ -0,0 +1,25 @@ +package com.moing.backend.domain.missionArchive.domain.service; + +import com.moing.backend.domain.member.domain.entity.Member; +import com.moing.backend.domain.missionArchive.application.dto.res.MissionArchiveRes; +import com.moing.backend.domain.missionArchive.domain.repository.MissionArchiveRepository; +import com.moing.backend.global.annotation.DomainService; +import lombok.RequiredArgsConstructor; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +@DomainService +@Transactional +@RequiredArgsConstructor +public class MissionArchiveScheduleQueryService { + + + private final MissionArchiveRepository missionArchiveRepository; + + public List getRemainMissionPeople() { + return missionArchiveRepository.findPeopleRemainMission().orElseThrow(); + } + + +} diff --git a/src/main/java/com/moing/backend/domain/missionState/domain/entity/MissionState.java b/src/main/java/com/moing/backend/domain/missionState/domain/entity/MissionState.java index 788b602c..22a550b8 100644 --- a/src/main/java/com/moing/backend/domain/missionState/domain/entity/MissionState.java +++ b/src/main/java/com/moing/backend/domain/missionState/domain/entity/MissionState.java @@ -23,7 +23,7 @@ public class MissionState extends BaseTimeEntity { @Column(name = "missionState_id") private Long id; - @OneToOne(fetch = FetchType.LAZY) + @ManyToOne(fetch = FetchType.LAZY) private Mission mission; @OneToOne private Member member; diff --git a/src/main/java/com/moing/backend/global/config/fcm/constant/RemindMissionTitle.java b/src/main/java/com/moing/backend/global/config/fcm/constant/RemindMissionTitle.java index d387ca59..662d90e9 100644 --- a/src/main/java/com/moing/backend/global/config/fcm/constant/RemindMissionTitle.java +++ b/src/main/java/com/moing/backend/global/config/fcm/constant/RemindMissionTitle.java @@ -7,16 +7,16 @@ @RequiredArgsConstructor public enum RemindMissionTitle { - REMIND_MISSION_TITLE1("님, 오늘도 좋은하루!"), - REMIND_MISSION_TITLE2("님, 잊으신 건 아니죠?\uD83D\uDC40"), - REMIND_MISSION_TITLE3("님, 좋은 아침이에요! ☀\uFE0F"), + REMIND_MISSION_TITLE1("오늘도 좋은 하루 보내세요!"), + REMIND_MISSION_TITLE2("혹시 ... 잊으신 건 아니죠?\uD83D\uDC40"), + REMIND_MISSION_TITLE3("좋은 아침이에요! ☀\uFE0F"), REMIND_MISSION_TITLE4("오늘의 열정이 타오르불\uD83D\uDD25"), - REMIND_MISSION_MESSAGE1(" 도전과 함께⚡\uFE0F "), - REMIND_MISSION_MESSAGE2(" 인증을 모임원들이 기다리고 있어요!"), - REMIND_MISSION_MESSAGE3(" 수행하고 이번주도 도전해요👊 "), - REMIND_MISSION_MESSAGE4(" 도전하고 성취감 뿜뿜💪 "); + REMIND_MISSION_MESSAGE1(" 자기계발 미션 도전과 함께⚡\uFE0F "), + REMIND_MISSION_MESSAGE2(" 미션 인증을 모임원들이 기다리고 있어요!"), + REMIND_MISSION_MESSAGE3(" 미션 인증하고 이번주도 도전해요👊 "), + REMIND_MISSION_MESSAGE4(" 미션 도전하고 성취감 뿜뿜💪 "); private final String message; diff --git a/src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java b/src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java new file mode 100644 index 00000000..dc94f7fc --- /dev/null +++ b/src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java @@ -0,0 +1,29 @@ +package com.moing.backend.domain.missionArchive.domain.repository; + +import com.querydsl.jpa.impl.JPAQueryFactory; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; + +import javax.persistence.EntityManager; +import java.util.List; +import java.util.Optional; + +import static com.moing.backend.domain.mission.domain.entity.QMission.mission; +import static com.moing.backend.domain.missionState.domain.entity.QMissionState.missionState; +@SpringBootTest +class MissionArchiveCustomRepositoryImplTest { + + @Autowired + EntityManager em; + + @Autowired + private MissionArchiveRepository missionArchiveRepository; + + @Test + void findPeopleRemainMission() { + + System.out.println("!!!"+ missionArchiveRepository.findPeopleRemainMission()); + + } +} \ No newline at end of file From 327b597096ae02b904d9a7f6adfa2819812b8f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=20=EC=8A=B9=20=EC=97=B0?= <53565255+seungyeonnnnnni@users.noreply.github.com> Date: Wed, 6 Dec 2023 23:37:34 +0900 Subject: [PATCH 2/5] =?UTF-8?q?chore=20:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20serivce=20import=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../missionArchive/presentation/MissionArchiveController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/moing/backend/domain/missionArchive/presentation/MissionArchiveController.java b/src/main/java/com/moing/backend/domain/missionArchive/presentation/MissionArchiveController.java index 1bf57b83..5864ffdd 100644 --- a/src/main/java/com/moing/backend/domain/missionArchive/presentation/MissionArchiveController.java +++ b/src/main/java/com/moing/backend/domain/missionArchive/presentation/MissionArchiveController.java @@ -1,15 +1,11 @@ package com.moing.backend.domain.missionArchive.presentation; -import com.moing.backend.domain.member.domain.entity.Member; -import com.moing.backend.domain.mission.application.dto.res.GatherRepeatMissionRes; import com.moing.backend.domain.missionArchive.application.dto.req.MissionArchiveReq; import com.moing.backend.domain.missionArchive.application.dto.res.MissionArchiveRes; import com.moing.backend.domain.missionArchive.application.dto.res.MissionArchiveStatusRes; import com.moing.backend.domain.missionArchive.application.dto.res.MyMissionArchiveRes; import com.moing.backend.domain.missionArchive.application.dto.res.PersonalArchiveRes; import com.moing.backend.domain.missionArchive.application.service.*; -import com.moing.backend.domain.missionArchive.domain.service.MissionArchiveDeleteService; -import com.moing.backend.domain.missionArchive.domain.service.MissionArchiveScheduleQueryService; import com.moing.backend.domain.missionHeart.application.dto.MissionHeartRes; import com.moing.backend.domain.missionHeart.application.service.MissionHeartUseCase; import com.moing.backend.global.config.security.dto.User; From ad539ab3aea82a10cebfffb80e369706363ff9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=20=EC=8A=B9=20=EC=97=B0?= <53565255+seungyeonnnnnni@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:38:08 +0900 Subject: [PATCH 3/5] =?UTF-8?q?fix=20:=20=EC=99=84=EB=A3=8C=ED=95=9C=20?= =?UTF-8?q?=EB=B0=98=EB=B3=B5=EB=AF=B8=EC=85=98=20=EB=AF=B8=EC=85=98=20?= =?UTF-8?q?=EB=AA=A8=EC=95=84=EB=B3=B4=EA=B8=B0=EC=97=90=20=EC=95=88?= =?UTF-8?q?=EB=9C=A8=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/MissionCustomRepositoryImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java b/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java index e35e1b7d..b2183bbf 100644 --- a/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java +++ b/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java @@ -6,10 +6,12 @@ import com.moing.backend.domain.mission.domain.entity.Mission; import com.moing.backend.domain.mission.domain.entity.constant.MissionStatus; import com.moing.backend.domain.mission.domain.entity.constant.MissionType; +import com.moing.backend.domain.missionArchive.domain.entity.QMissionArchive; import com.moing.backend.domain.missionState.domain.entity.QMissionState; import com.querydsl.core.types.Projections; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.JPAExpressions; +import com.querydsl.jpa.JPQLQuery; import com.querydsl.jpa.impl.JPAQueryFactory; import javax.persistence.EntityManager; @@ -44,6 +46,8 @@ public Long findMissionsCountByTeam(Long teamId) { @Override public Optional> findRepeatMissionByMemberId(Long memberId,Listteams) { + QMissionArchive subMissionArchive = new QMissionArchive("subMissionArchive"); + return Optional.ofNullable(queryFactory .select(Projections.constructor(GatherRepeatMissionRes.class, mission.id, @@ -58,15 +62,17 @@ public Optional> findRepeatMissionByMemberId(Long m .leftJoin(missionArchive) .on(missionArchive.mission.eq(mission), missionArchive.member.memberId.eq(memberId) -// ,missionArchive.count.max().loe(missionArchive.mission.number) ) .where( mission.team.teamId.in(teams), mission.status.eq(MissionStatus.ONGOING), mission.type.eq(MissionType.REPEAT) + ) - .groupBy(mission.id) - .orderBy(missionArchive.count().desc()) + .groupBy(mission.id,mission.number) +// .having(missionArchive.count().lt(mission.number)) // HAVING 절을 사용하여 조건 적용 + + .orderBy(missionArchive.count().desc()) .fetch()); } From 82503e9b4317e01a85a2c97c706a698afb62825b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=20=EC=8A=B9=20=EC=97=B0?= <53565255+seungyeonnnnnni@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:39:37 +0900 Subject: [PATCH 4/5] =?UTF-8?q?fix=20:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20subquery=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mission/domain/repository/MissionCustomRepositoryImpl.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java b/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java index b2183bbf..d19c1a12 100644 --- a/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java +++ b/src/main/java/com/moing/backend/domain/mission/domain/repository/MissionCustomRepositoryImpl.java @@ -46,8 +46,6 @@ public Long findMissionsCountByTeam(Long teamId) { @Override public Optional> findRepeatMissionByMemberId(Long memberId,Listteams) { - QMissionArchive subMissionArchive = new QMissionArchive("subMissionArchive"); - return Optional.ofNullable(queryFactory .select(Projections.constructor(GatherRepeatMissionRes.class, mission.id, From be0adba52129be2fa1eb276c930014b03ecba4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=20=EC=8A=B9=20=EC=97=B0?= <53565255+seungyeonnnnnni@users.noreply.github.com> Date: Sat, 9 Dec 2023 14:43:18 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix=20:=20MissionArchiveCustomRepositoryImp?= =?UTF-8?q?lTest=20=EC=A3=BC=EC=84=9D=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...issionArchiveCustomRepositoryImplTest.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java b/src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java index dc94f7fc..37889c66 100644 --- a/src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java +++ b/src/test/java/com/moing/backend/domain/missionArchive/domain/repository/MissionArchiveCustomRepositoryImplTest.java @@ -1,29 +1,29 @@ -package com.moing.backend.domain.missionArchive.domain.repository; - -import com.querydsl.jpa.impl.JPAQueryFactory; -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; - -import javax.persistence.EntityManager; -import java.util.List; -import java.util.Optional; - -import static com.moing.backend.domain.mission.domain.entity.QMission.mission; -import static com.moing.backend.domain.missionState.domain.entity.QMissionState.missionState; -@SpringBootTest -class MissionArchiveCustomRepositoryImplTest { - - @Autowired - EntityManager em; - - @Autowired - private MissionArchiveRepository missionArchiveRepository; - - @Test - void findPeopleRemainMission() { - - System.out.println("!!!"+ missionArchiveRepository.findPeopleRemainMission()); - - } -} \ No newline at end of file +//package com.moing.backend.domain.missionArchive.domain.repository; +// +//import com.querydsl.jpa.impl.JPAQueryFactory; +//import org.junit.jupiter.api.Test; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.boot.test.context.SpringBootTest; +// +//import javax.persistence.EntityManager; +//import java.util.List; +//import java.util.Optional; +// +//import static com.moing.backend.domain.mission.domain.entity.QMission.mission; +//import static com.moing.backend.domain.missionState.domain.entity.QMissionState.missionState; +//@SpringBootTest +//class MissionArchiveCustomRepositoryImplTest { +// +// @Autowired +// EntityManager em; +// +// @Autowired +// private MissionArchiveRepository missionArchiveRepository; +// +// @Test +// void findPeopleRemainMission() { +// +// System.out.println("!!!"+ missionArchiveRepository.findPeopleRemainMission()); +// +// } +//} \ No newline at end of file