feat: 章节列表返回 isVip

This commit is contained in:
xiongxiaoyang 2022-05-30 06:48:41 +08:00
parent b6a07d3a0c
commit 4d71aa33b1
2 changed files with 7 additions and 0 deletions

View File

@ -52,4 +52,9 @@ public class BookChapterRespDto implements Serializable {
@JsonFormat(pattern = "yyyy/MM/dd HH:dd")
private LocalDateTime chapterUpdateTime;
/**
* 是否收费;1-收费 0-免费
*/
private Integer isVip;
}

View File

@ -191,6 +191,7 @@ public class BookServiceImpl implements BookService {
return RestResp.ok(bookChapterMapper.selectList(queryWrapper).stream().map(v -> BookChapterRespDto.builder()
.id(v.getId())
.chapterName(v.getChapterName())
.isVip(v.getIsVip())
.build()).toList());
}
@ -393,6 +394,7 @@ public class BookServiceImpl implements BookService {
.id(v.getId())
.chapterName(v.getChapterName())
.chapterUpdateTime(v.getUpdateTime())
.isVip(v.getIsVip())
.build()).toList()));
}