Skip to content

Commit

Permalink
weatherIconUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
Johyunik committed Dec 2, 2023
1 parent e7fae7f commit 5db19b5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public String insertBoard(@RequestHeader("decodedToken") String nickName, @Reque
.temperature(boardWriteDTO.getTemperature())
.category(boardWriteDTO.getCategory())
.hashTag(boardWriteDTO.getHashTag())
.weatherIcon(boardWriteDTO.getWeatherIcon())
.build();

BoardEntity savedBoard = boardService.insertBoard(boardEntity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public class BoardListResponseDTO {
private ImageDTO images;
private List<String> category;
private List<String> hashTag;
private String weatherIcon;
}
1 change: 1 addition & 0 deletions src/main/java/com/weatherfit/board/dto/BoardSearchDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ public class BoardSearchDTO {
private ImageDTO images;
private List<String> category;
private List<String> hashTag;
private String weatherIcon;
}
1 change: 1 addition & 0 deletions src/main/java/com/weatherfit/board/dto/BoardWriteDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ public class BoardWriteDTO {
private int temperature;
private List<String> category;
private List<String> hashTag;
private String weatherIcon;
}
13 changes: 9 additions & 4 deletions src/main/java/com/weatherfit/board/service/BoardService.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public List<BoardListResponseDTO> findAll() {
.likeCount(likeService.countLikes(board.getBoardId()))
.hashTag(board.getHashTag())
.category(board.getCategory())
.temperature(board.getTemperature());
.temperature(board.getTemperature())
.weatherIcon(board.getWeatherIcon());

if (!board.getImages().isEmpty()) {
builder.images(board.entityToDTO(board.getImages().get(0)));
Expand All @@ -69,7 +70,8 @@ public List<BoardListResponseDTO> findDate() {
.likeCount(likeService.countLikes(board.getBoardId()))
.hashTag(board.getHashTag())
.category(board.getCategory())
.temperature(board.getTemperature());
.temperature(board.getTemperature())
.weatherIcon(board.getWeatherIcon());

if (!board.getImages().isEmpty()) {
builder.images(board.entityToDTO(board.getImages().get(0)));
Expand All @@ -92,7 +94,8 @@ public List<BoardListResponseDTO> findLike() {
.likeCount(likeService.countLikes(board.getBoardId()))
.hashTag(board.getHashTag())
.category(board.getCategory())
.temperature(board.getTemperature());
.temperature(board.getTemperature())
.weatherIcon(board.getWeatherIcon());

if (!board.getImages().isEmpty()) {
builder.images(board.entityToDTO(board.getImages().get(0)));
Expand All @@ -116,7 +119,8 @@ public List<BoardListResponseDTO> findNickname(String nickName) {
.likeCount(likeService.countLikes(board.getBoardId()))
.hashTag(board.getHashTag())
.category(board.getCategory())
.temperature(board.getTemperature());
.temperature(board.getTemperature())
.weatherIcon(board.getWeatherIcon());

if (!board.getImages().isEmpty()) {
builder.images(board.entityToDTO(board.getImages().get(0)));
Expand Down Expand Up @@ -231,6 +235,7 @@ public List<BoardSearchDTO> search(List<String> categories, List<String> hashTag
.hashTag(board.getHashTag())
.likeCount(likeService.countLikes(board.getBoardId()))
.images(board.entityToDTO(board.getImages().get(0)))
.weatherIcon(board.getWeatherIcon())
.build();

result.add(dto);
Expand Down

0 comments on commit 5db19b5

Please sign in to comment.