diff --git a/src/main/java/com/ivory/ivory/dto/ApplyListDto.java b/src/main/java/com/ivory/ivory/dto/ApplyListDto.java index dc68d4c..707f754 100644 --- a/src/main/java/com/ivory/ivory/dto/ApplyListDto.java +++ b/src/main/java/com/ivory/ivory/dto/ApplyListDto.java @@ -9,14 +9,16 @@ @AllArgsConstructor @NoArgsConstructor public class ApplyListDto { + private Long id; private String name; private String applyDate; private String careDate; private String careTime; private String status; - public static ApplyListDto from(String name,String applyDate,String careDate,String careTime, String status) { + public static ApplyListDto from(Long id, String name,String applyDate,String careDate,String careTime, String status) { return ApplyListDto.builder() + .id(id) .name(name) .applyDate(applyDate) .careDate(careDate) diff --git a/src/main/java/com/ivory/ivory/service/ApplyService.java b/src/main/java/com/ivory/ivory/service/ApplyService.java index 44c6d3e..a4b690b 100644 --- a/src/main/java/com/ivory/ivory/service/ApplyService.java +++ b/src/main/java/com/ivory/ivory/service/ApplyService.java @@ -122,6 +122,9 @@ public CustomApiResponse getApplyList(Long childId, Long currentMemberId) { //응답 dto 생성 List applyListDto = new ArrayList<>(); applyList.forEach(apply -> { + //신청 기본키 + Long id = apply.getId(); + //이름 String name = child.get().getName(); @@ -138,7 +141,7 @@ public CustomApiResponse getApplyList(Long childId, Long currentMemberId) { Status serviceStatus = getNowStatus(apply.getStartDate(),apply.getEndDate()); String status = getStatus(serviceStatus); - applyListDto.add(ApplyListDto.from(name,applyDate,careDate,careTime,status)); + applyListDto.add(ApplyListDto.from(id,name,applyDate,careDate,careTime,status)); }); return CustomApiResponse.createSuccess(HttpStatus.OK.value(),"신청 목록 조회에 성공했습니다.",applyListDto); }