From 20d7ddaa705741f4bd36e921e0fca5204c596e9e 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: Mon, 6 Nov 2023 04:28:14 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=AF=B8=EC=85=98=20=EB=AA=A8?= =?UTF-8?q?=EC=95=84=EB=B3=B4=EA=B8=B0-teamId=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mission/application/dto/res/GatherRepeatMissionRes.java | 1 + .../mission/application/dto/res/GatherSingleMissionRes.java | 1 + .../domain/repository/MissionCustomRepositoryImpl.java | 2 ++ .../representation/MissionGatherControllerTest.java | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherRepeatMissionRes.java b/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherRepeatMissionRes.java index bfedd3d8..5249ce34 100644 --- a/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherRepeatMissionRes.java +++ b/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherRepeatMissionRes.java @@ -10,6 +10,7 @@ public class GatherRepeatMissionRes { private Long missionId; + private Long teamId; private String teamName; private String missionTitle; private String totalNum; diff --git a/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherSingleMissionRes.java b/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherSingleMissionRes.java index fba77c0a..1afe2085 100644 --- a/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherSingleMissionRes.java +++ b/src/main/java/com/moing/backend/domain/mission/application/dto/res/GatherSingleMissionRes.java @@ -9,6 +9,7 @@ @AllArgsConstructor public class GatherSingleMissionRes { private Long missionId; + private Long teamId; private String teamName; private String missionTitle; private String dueTo; 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 f04a8c12..9cb1ff84 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 @@ -42,6 +42,7 @@ public Optional> findRepeatMissionByMemberId(Long m return Optional.ofNullable(queryFactory .select(Projections.constructor(GatherRepeatMissionRes.class, mission.id, + mission.team.teamId, mission.team.name, mission.title, mission.number.stringValue(), @@ -88,6 +89,7 @@ public Optional> findSingleMissionByMemberId(Long m return Optional.ofNullable(queryFactory .select(Projections.constructor(GatherSingleMissionRes.class, mission.id, + mission.team.teamId, mission.team.name, mission.title, mission.dueTo.stringValue() diff --git a/src/test/java/com/moing/backend/domain/missionArchive/representation/MissionGatherControllerTest.java b/src/test/java/com/moing/backend/domain/missionArchive/representation/MissionGatherControllerTest.java index 0985af75..523cc66f 100644 --- a/src/test/java/com/moing/backend/domain/missionArchive/representation/MissionGatherControllerTest.java +++ b/src/test/java/com/moing/backend/domain/missionArchive/representation/MissionGatherControllerTest.java @@ -40,6 +40,7 @@ public class MissionGatherControllerTest extends CommonControllerTest { List output = Lists.newArrayList(GatherSingleMissionRes.builder() .missionId(1L) + .teamId(1L) .dueTo("2023-09-03T21:32:33.888") .teamName("team name") .missionTitle("mission title") @@ -68,6 +69,7 @@ public class MissionGatherControllerTest extends CommonControllerTest { fieldWithPath("isSuccess").description("true"), fieldWithPath("message").description(ACTIVE_SINGLE_MISSION_SUCCESS.getMessage()), fieldWithPath("data[].missionId").description("미션 아이디"), + fieldWithPath("data[].teamId").description("팀 아이디"), fieldWithPath("data[].dueTo").description("미션 마감 시각"), fieldWithPath("data[].teamName").description("팀 이름"), fieldWithPath("data[].missionTitle").description("미션 제목") @@ -85,6 +87,7 @@ public class MissionGatherControllerTest extends CommonControllerTest { List output = Lists.newArrayList(GatherRepeatMissionRes.builder() .missionId(1L) + .teamId(1L) .teamName("team name") .missionTitle("mission title") .doneNum("0") @@ -114,6 +117,7 @@ public class MissionGatherControllerTest extends CommonControllerTest { fieldWithPath("isSuccess").description("true"), fieldWithPath("message").description(ACTIVE_REPEAT_MISSION_SUCCESS.getMessage()), fieldWithPath("data[].missionId").description("미션 아이디"), + fieldWithPath("data[].teamId").description("팀 아이디"), fieldWithPath("data[].teamName").description("팀 이름"), fieldWithPath("data[].missionTitle").description("미션 제목"), fieldWithPath("data[].doneNum").description("완료한 횟수"),