From ad907063d94cb9e9c4a271e3f89cdafe5afd4631 Mon Sep 17 00:00:00 2001 From: xiongxiaoyang <773861846@qq.com> Date: Sun, 29 May 2022 18:03:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=8F=E8=AF=B4=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E8=BF=94?= =?UTF-8?q?=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../github/xxyopen/novel/dto/resp/BookInfoRespDto.java | 9 +++++++++ .../xxyopen/novel/service/impl/BookServiceImpl.java | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/xxyopen/novel/dto/resp/BookInfoRespDto.java b/src/main/java/io/github/xxyopen/novel/dto/resp/BookInfoRespDto.java index 55ba809..011939f 100644 --- a/src/main/java/io/github/xxyopen/novel/dto/resp/BookInfoRespDto.java +++ b/src/main/java/io/github/xxyopen/novel/dto/resp/BookInfoRespDto.java @@ -1,7 +1,10 @@ package io.github.xxyopen.novel.dto.resp; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.*; +import java.time.LocalDateTime; + /** * 小说信息 响应DTO * @@ -89,5 +92,11 @@ public class BookInfoRespDto { */ private String lastChapterName; + /** + * 最新章节更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime updateTime; + } diff --git a/src/main/java/io/github/xxyopen/novel/service/impl/BookServiceImpl.java b/src/main/java/io/github/xxyopen/novel/service/impl/BookServiceImpl.java index 87f9a13..4a31b2e 100644 --- a/src/main/java/io/github/xxyopen/novel/service/impl/BookServiceImpl.java +++ b/src/main/java/io/github/xxyopen/novel/service/impl/BookServiceImpl.java @@ -362,11 +362,10 @@ public class BookServiceImpl implements BookService { .id(v.getId()) .bookName(v.getBookName()) .picUrl(v.getPicUrl()) - .categoryId(v.getCategoryId()) .categoryName(v.getCategoryName()) .wordCount(v.getWordCount()) .visitCount(v.getVisitCount()) - .lastChapterName(v.getLastChapterName()) + .updateTime(v.getUpdateTime()) .build()).toList())); }