v1.3.0发布

This commit is contained in:
xiongxiaoyang 2020-06-07 18:42:39 +08:00
parent 770cb7dd54
commit 9b8f5a177e
3 changed files with 16 additions and 10 deletions

View File

@ -57,9 +57,10 @@ public interface BookApi {
* 新增评论 * 新增评论
* @param userId 用户ID * @param userId 用户ID
* @param comment 评论数据 * @param comment 评论数据
* @return true:评论成功false:评论失败
* */ * */
@PostMapping("api/book/addBookComment") @PostMapping("api/book/addBookComment")
void addBookComment(@RequestParam("userId") Long userId,@RequestParam("comment") BookComment comment); boolean addBookComment(@RequestParam("userId") Long userId,@RequestParam("comment") BookComment comment);
/** /**
* 分页查询用户评论 * 分页查询用户评论
@ -86,7 +87,8 @@ public interface BookApi {
* 更新图片路径 * 更新图片路径
* @param picUrl 图片路径 * @param picUrl 图片路径
* @param bookId 小说ID * @param bookId 小说ID
* @return true:更新成功false:更新失败
*/ */
@PostMapping("api/book/updateBookPic") @PostMapping("api/book/updateBookPic")
void updateBookPic(@RequestParam("picUrl") String picUrl,@RequestParam("bookId") Long bookId); boolean updateBookPic(@RequestParam("picUrl") String picUrl,@RequestParam("bookId") Long bookId);
} }

View File

@ -27,7 +27,7 @@ public class BookApiFallback implements BookApi {
@Override @Override
public List<Book> listRank(Byte type, Integer limit) { public List<Book> listRank(Byte type, Integer limit) {
return null; return new ArrayList<>();
} }
@Override @Override
@ -36,22 +36,24 @@ public class BookApiFallback implements BookApi {
} }
@Override @Override
public void addBookComment(Long userId, BookComment comment) { public boolean addBookComment(Long userId, BookComment comment) {
return false;
} }
@Override @Override
public List<BookComment> listUserCommentByPage(Long userId, int page, int pageSize) { public List<BookComment> listUserCommentByPage(Long userId, int page, int pageSize) {
return null; return new ArrayList<>();
} }
@Override @Override
public List<Book> queryNetworkPicBooks(String localPicPrefix, int limit) { public List<Book> queryNetworkPicBooks(String localPicPrefix, int limit) {
return null; return new ArrayList<>();
} }
@Override @Override
public void updateBookPic(String picUrl, Long bookId) { public boolean updateBookPic(String picUrl, Long bookId) {
return false;
} }
} }

View File

@ -76,8 +76,9 @@ public class BookApi {
* @param comment 评论数据 * @param comment 评论数据
* */ * */
@PostMapping("addBookComment") @PostMapping("addBookComment")
void addBookComment(Long userId, BookComment comment){ boolean addBookComment(Long userId, BookComment comment){
bookService.addBookComment(userId,comment); bookService.addBookComment(userId,comment);
return true;
} }
/** /**
@ -110,8 +111,9 @@ public class BookApi {
* @param bookId 小说ID * @param bookId 小说ID
*/ */
@PostMapping("updateBookPic") @PostMapping("updateBookPic")
void updateBookPic(@RequestParam("picUrl") String picUrl,@RequestParam("bookId") Long bookId){ boolean updateBookPic(@RequestParam("picUrl") String picUrl,@RequestParam("bookId") Long bookId){
bookService.updateBookPic(picUrl,bookId); bookService.updateBookPic(picUrl,bookId);
return true;
} }
} }