diff --git a/src/main/java/com/example/blism/controller/LetterController.java b/src/main/java/com/example/blism/controller/LetterController.java index f4e7410..83ea8ba 100644 --- a/src/main/java/com/example/blism/controller/LetterController.java +++ b/src/main/java/com/example/blism/controller/LetterController.java @@ -163,6 +163,9 @@ public ResponseEntity getLetters(@PathVariable Long letterId) { .content(letter.getContent()) .photoUrl(letter.getPhotoUrl()) .font(letter.getFont()) + .doorDesign(letter.getDoorNum()) + .colorDesign(letter.getColorNum()) + .decorationDesign(letter.getDecorationNum()) .senderId(letter.getSender().getId()) .senderNickname(letter.getSender().getNickname()) .receiverId(letter.getReceiver().getId()) diff --git a/src/main/java/com/example/blism/dto/response/LetterResponseDTO.java b/src/main/java/com/example/blism/dto/response/LetterResponseDTO.java index 6c665f0..86491b6 100644 --- a/src/main/java/com/example/blism/dto/response/LetterResponseDTO.java +++ b/src/main/java/com/example/blism/dto/response/LetterResponseDTO.java @@ -17,6 +17,9 @@ public class LetterResponseDTO { private String content; private String photoUrl; private Integer font; + private Integer doorDesign; + private Integer colorDesign; + private Integer decorationDesign; private Integer visibility; private LocalDateTime createdAt; } diff --git a/src/main/java/com/example/blism/service/LetterService.java b/src/main/java/com/example/blism/service/LetterService.java index 892decd..9fe87b6 100644 --- a/src/main/java/com/example/blism/service/LetterService.java +++ b/src/main/java/com/example/blism/service/LetterService.java @@ -47,17 +47,17 @@ public String createLetter(MultipartFile image, CreateLetterRequestDTO dto) { String photoUrl = s3Service.upload(image); - Letter letter = Letter.builder() - .sender(sender.get()) - .receiver(receiver.get()) - .mailbox(mailbox.get()) - .doorNum(dto.getDoorDesign()) - .colorNum(dto.getColorDesign()) - .decorationNum(dto.getDecorationDesign()) - .photoUrl(photoUrl) - .content(dto.getContent()) - .font(dto.getFont()) - .visibility(dto.getVisibility()) + Letter letter = Letter.builder() + .sender(sender.get()) + .receiver(receiver.get()) + .mailbox(mailbox.get()) + .doorNum(dto.getDoorDesign()) + .colorNum(dto.getColorDesign()) + .decorationNum(dto.getDecorationDesign()) + .photoUrl(photoUrl) + .content(dto.getContent()) + .font(dto.getFont()) + .visibility(dto.getVisibility()) .build(); letterRepository.save(letter); @@ -78,6 +78,9 @@ public List getSentLetters(Long userId) { .content(letter.getContent()) .photoUrl(letter.getPhotoUrl()) .font(letter.getFont()) + .doorDesign(letter.getDoorNum()) + .colorDesign(letter.getColorNum()) + .decorationDesign(letter.getDecorationNum()) .senderId(letter.getSender().getId()) .senderNickname(letter.getSender().getNickname()) .receiverId(letter.getReceiver().getId()) @@ -97,6 +100,9 @@ public List getReceivedLetters(Long userId) { .content(letter.getContent()) .photoUrl(letter.getPhotoUrl()) .font(letter.getFont()) + .doorDesign(letter.getDoorNum()) + .colorDesign(letter.getColorNum()) + .decorationDesign(letter.getDecorationNum()) .senderId(letter.getSender().getId()) .senderNickname(letter.getSender().getNickname()) .receiverId(letter.getReceiver().getId())