From 5ddbdfb2c4fe6dcb0dd6288539ac042eb26d7457 Mon Sep 17 00:00:00 2001 From: mummhy0811 Date: Tue, 4 Jun 2024 15:23:49 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=82=B4=20=ED=8C=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EC=B4=9D=EB=AC=B4=20=EB=98=90=EB=8A=94=20=EB=AA=A8?= =?UTF-8?q?=EC=9E=84=EC=9B=90=EB=A7=8C=20=EB=A6=AC=ED=84=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../triptogether/account/service/impl/AccountServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java b/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java index fdbdf09..42b8930 100644 --- a/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java +++ b/src/main/java/com/hanaro/triptogether/account/service/impl/AccountServiceImpl.java @@ -6,6 +6,7 @@ import com.hanaro.triptogether.account.dto.response.AccountsResDto; import com.hanaro.triptogether.account.dto.response.TeamServiceListResDto; import com.hanaro.triptogether.account.service.AccountService; +import com.hanaro.triptogether.enumeration.TeamMemberState; import com.hanaro.triptogether.exception.ApiException; import com.hanaro.triptogether.exception.ExceptionEnum; import com.hanaro.triptogether.member.domain.Member; @@ -41,7 +42,7 @@ public List teamServiceList(Long memberIdx) { for(int i = 0; i < teams.size(); i++) { Optional teamMember= teamMemberRepository.findTeamMemberByMember_MemberIdxAndTeam_TeamIdx(memberIdx, teams.get(i).getTeamIdx()); - if(teamMember.isPresent()) { + if(teamMember.isPresent() && (teamMember.get().getTeamMemberState() == TeamMemberState.총무 || teamMember.get().getTeamMemberState() == TeamMemberState.모임원)) { Long teamMemberIdx = teamMember.get().getTeamMemberIdx(); TeamServiceListResDto teamServiceListResDto = TeamServiceListResDto.builder() .accIdx(teams.get(i).getAccount().getAccIdx())