From 15746affeb15b7b0a406e8d69052c3ad5c1b8e57 Mon Sep 17 00:00:00 2001 From: DongGeon Lee <71763322+himodu@users.noreply.github.com> Date: Tue, 21 May 2024 13:08:53 +0900 Subject: [PATCH] [MODIFY] getAllbooth debug - getAllbooth debug --- .../KNUfest/domain/booth/service/BoothServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java b/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java index bfc0142..11e4327 100644 --- a/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java +++ b/src/main/java/LlikelionKNU/KNUfest/domain/booth/service/BoothServiceImpl.java @@ -54,9 +54,12 @@ public AllBooth getAllbooth(String userHash) { // Likable Service if(!userBoothEntityList.isEmpty()){ for(UserBoothEntity userBooth : userBoothEntityList){ - Booth tempbooth = boothDtos.get(userBooth.getBooth().getId().intValue()-1); + + BoothEntity booth = userBooth.getBooth(); + int index = boothes.indexOf(booth); + Booth tempbooth = boothDtos.get(index); tempbooth.setLikable(false); - boothDtos.set(userBooth.getBooth().getId().intValue()-1, tempbooth); + boothDtos.set(index, tempbooth); } }