-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] 임시 저장 일기에 대해 구현되지 않은 부분을 구현
- Loading branch information
Showing
22 changed files
with
308 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/generated/moodbuddy/moodbuddy/domain/diary/mapper/draft/DraftDiaryMapperImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package moodbuddy.moodbuddy.domain.diary.mapper.draft; | ||
|
||
import javax.annotation.processing.Generated; | ||
import moodbuddy.moodbuddy.domain.diary.domain.Diary; | ||
import moodbuddy.moodbuddy.domain.diary.dto.response.DiaryResDetailDTO; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Generated( | ||
value = "org.mapstruct.ap.MappingProcessor", | ||
date = "2024-11-26T01:51:46+0900", | ||
comments = "version: 1.5.3.Final, compiler: javac, environment: Java 17.0.13 (Homebrew)" | ||
) | ||
@Component | ||
public class DraftDiaryMapperImpl implements DraftDiaryMapper { | ||
|
||
@Override | ||
public DiaryResDetailDTO toResDetailDTO(Diary diary) { | ||
if ( diary == null ) { | ||
return null; | ||
} | ||
|
||
DiaryResDetailDTO.DiaryResDetailDTOBuilder diaryResDetailDTO = DiaryResDetailDTO.builder(); | ||
|
||
diaryResDetailDTO.diaryId( diary.getDiaryId() ); | ||
diaryResDetailDTO.moodBuddyStatus( diary.getMoodBuddyStatus() ); | ||
diaryResDetailDTO.userId( diary.getUserId() ); | ||
diaryResDetailDTO.diaryTitle( diary.getDiaryTitle() ); | ||
diaryResDetailDTO.diaryDate( diary.getDiaryDate() ); | ||
diaryResDetailDTO.diaryContent( diary.getDiaryContent() ); | ||
diaryResDetailDTO.diaryWeather( diary.getDiaryWeather() ); | ||
diaryResDetailDTO.diaryEmotion( diary.getDiaryEmotion() ); | ||
diaryResDetailDTO.diaryStatus( diary.getDiaryStatus() ); | ||
diaryResDetailDTO.diarySummary( diary.getDiarySummary() ); | ||
diaryResDetailDTO.diarySubject( diary.getDiarySubject() ); | ||
diaryResDetailDTO.diaryBookMarkCheck( diary.getDiaryBookMarkCheck() ); | ||
diaryResDetailDTO.diaryFont( diary.getDiaryFont() ); | ||
diaryResDetailDTO.diaryFontSize( diary.getDiaryFontSize() ); | ||
|
||
return diaryResDetailDTO.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
...ain/java/moodbuddy/moodbuddy/domain/diary/dto/response/draft/DiaryResDraftFindAllDTO.java
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
...main/java/moodbuddy/moodbuddy/domain/diary/dto/response/draft/DraftDiaryResDetailDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package moodbuddy.moodbuddy.domain.diary.dto.response.draft; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import moodbuddy.moodbuddy.domain.diary.domain.type.DiaryFont; | ||
import moodbuddy.moodbuddy.domain.diary.domain.type.DiaryFontSize; | ||
import moodbuddy.moodbuddy.domain.diary.domain.type.DiaryStatus; | ||
import moodbuddy.moodbuddy.domain.diary.domain.type.DiaryWeather; | ||
import moodbuddy.moodbuddy.global.common.base.MoodBuddyStatus; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class DraftDiaryResDetailDTO { | ||
private Long diaryId; | ||
private Long userId; | ||
private String diaryTitle; | ||
private LocalDate diaryDate; | ||
private String diaryContent; | ||
private DiaryWeather diaryWeather; | ||
private DiaryStatus diaryStatus; | ||
private DiaryFont diaryFont; | ||
private DiaryFontSize diaryFontSize; | ||
private MoodBuddyStatus moodBuddyStatus; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private List<String> diaryImgList; | ||
|
||
public DraftDiaryResDetailDTO(Long diaryId, Long userId, String diaryTitle, LocalDate diaryDate, String diaryContent, DiaryWeather diaryWeather, DiaryStatus diaryStatus, DiaryFont diaryFont, DiaryFontSize diaryFontSize, MoodBuddyStatus moodBuddyStatus) { | ||
this.diaryId = diaryId; | ||
this.userId = userId; | ||
this.diaryTitle = diaryTitle; | ||
this.diaryDate = diaryDate; | ||
this.diaryContent = diaryContent; | ||
this.diaryWeather = diaryWeather; | ||
this.diaryStatus = diaryStatus; | ||
this.diaryFont = diaryFont; | ||
this.diaryFontSize = diaryFontSize; | ||
this.moodBuddyStatus = moodBuddyStatus; | ||
this.diaryImgList = List.of(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 11 additions & 5 deletions
16
src/main/java/moodbuddy/moodbuddy/domain/diary/facade/draft/DraftDiaryFacade.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
package moodbuddy.moodbuddy.domain.diary.facade.draft; | ||
|
||
import moodbuddy.moodbuddy.domain.diary.dto.request.draft.DiaryReqDraftSelectDeleteDTO; | ||
import moodbuddy.moodbuddy.domain.diary.dto.request.DiaryReqUpdateDTO; | ||
import moodbuddy.moodbuddy.domain.diary.dto.request.draft.DraftDiaryReqSelectDeleteDTO; | ||
import moodbuddy.moodbuddy.domain.diary.dto.request.DiaryReqSaveDTO; | ||
import moodbuddy.moodbuddy.domain.diary.dto.response.DiaryResDetailDTO; | ||
import moodbuddy.moodbuddy.domain.diary.dto.response.draft.DiaryResDraftFindAllDTO; | ||
import moodbuddy.moodbuddy.domain.diary.dto.response.draft.DraftDiaryResDetailDTO; | ||
import moodbuddy.moodbuddy.domain.diary.dto.response.draft.DraftDiaryResFindOneDTO; | ||
|
||
import java.util.List; | ||
|
||
public interface DraftDiaryFacade { | ||
DiaryResDetailDTO saveDraftDiary(DiaryReqSaveDTO requestDTO); | ||
DiaryResDraftFindAllDTO draftFindAll(); | ||
void draftSelectDelete(DiaryReqDraftSelectDeleteDTO requestDTO); | ||
DiaryResDetailDTO save(DiaryReqSaveDTO requestDTO); | ||
DiaryResDetailDTO update(DiaryReqUpdateDTO requestDTO); | ||
List<DraftDiaryResFindOneDTO> findAll(); | ||
void selectDelete(DraftDiaryReqSelectDeleteDTO requestDTO); | ||
DraftDiaryResDetailDTO findOneByDiaryId(Long diaryId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/java/moodbuddy/moodbuddy/domain/diary/mapper/draft/DraftDiaryMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package moodbuddy.moodbuddy.domain.diary.mapper.draft; | ||
|
||
import moodbuddy.moodbuddy.domain.diary.domain.Diary; | ||
import moodbuddy.moodbuddy.domain.diary.dto.response.DiaryResDetailDTO; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
@Mapper(componentModel = "spring") | ||
public interface DraftDiaryMapper { | ||
DraftDiaryMapper INSTANCE = Mappers.getMapper(DraftDiaryMapper.class); | ||
|
||
@Mapping(source = "diaryId", target = "diaryId") | ||
@Mapping(source = "moodBuddyStatus", target = "moodBuddyStatus") | ||
DiaryResDetailDTO toResDetailDTO(Diary diary); | ||
} |
Oops, something went wrong.