diff --git a/src/main/java/ddingdong/ddingdongBE/domain/qrstamp/controller/dto/response/DetailAppliedUserResponse.java b/src/main/java/ddingdong/ddingdongBE/domain/qrstamp/controller/dto/response/DetailAppliedUserResponse.java index 3b27d44e..6de8ff9e 100644 --- a/src/main/java/ddingdong/ddingdongBE/domain/qrstamp/controller/dto/response/DetailAppliedUserResponse.java +++ b/src/main/java/ddingdong/ddingdongBE/domain/qrstamp/controller/dto/response/DetailAppliedUserResponse.java @@ -1,6 +1,7 @@ package ddingdong.ddingdongBE.domain.qrstamp.controller.dto.response; import ddingdong.ddingdongBE.domain.qrstamp.entity.StampHistory; +import java.util.List; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; @@ -15,6 +16,7 @@ public class DetailAppliedUserResponse { private String studentName; private String studentNumber; private String department; + private List collections; private String certificationImageUrl; public static DetailAppliedUserResponse from(StampHistory stampHistory) { @@ -23,6 +25,10 @@ public static DetailAppliedUserResponse from(StampHistory stampHistory) { .studentName(stampHistory.getStudentName()) .studentNumber(stampHistory.getStudentNumber()) .department(stampHistory.getDepartment()) + .collections(stampHistory.getCollectedStamps().keySet().stream() + .map(stamp -> CollectedStampsResponse.of(stamp.getName(), + stampHistory.getCollectedStamps().get(stamp))) + .toList()) .certificationImageUrl(stampHistory.getCertificationImageUrl()).build(); }