feat: 小说信息增加更新时间返回

This commit is contained in:
xiongxiaoyang 2022-05-29 18:03:30 +08:00
parent f33c66c5d2
commit ad907063d9
2 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,10 @@
package io.github.xxyopen.novel.dto.resp; package io.github.xxyopen.novel.dto.resp;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*; import lombok.*;
import java.time.LocalDateTime;
/** /**
* 小说信息 响应DTO * 小说信息 响应DTO
* *
@ -89,5 +92,11 @@ public class BookInfoRespDto {
*/ */
private String lastChapterName; private String lastChapterName;
/**
* 最新章节更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime updateTime;
} }

View File

@ -362,11 +362,10 @@ public class BookServiceImpl implements BookService {
.id(v.getId()) .id(v.getId())
.bookName(v.getBookName()) .bookName(v.getBookName())
.picUrl(v.getPicUrl()) .picUrl(v.getPicUrl())
.categoryId(v.getCategoryId())
.categoryName(v.getCategoryName()) .categoryName(v.getCategoryName())
.wordCount(v.getWordCount()) .wordCount(v.getWordCount())
.visitCount(v.getVisitCount()) .visitCount(v.getVisitCount())
.lastChapterName(v.getLastChapterName()) .updateTime(v.getUpdateTime())
.build()).toList())); .build()).toList()));
} }