mirror of
https://gitee.com/bookshelfplus/bookshelfplus
synced 2025-09-14 20:41:38 +08:00
添加用户收藏书籍、取消收藏书籍、获取书籍收藏状态功能(后端+数据库);更新Api文档
This commit is contained in:
@@ -5,6 +5,7 @@ import plus.bookshelf.Dao.DO.BookDO;
|
||||
import plus.bookshelf.Service.Model.BookModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface BookService {
|
||||
/**
|
||||
@@ -29,4 +30,30 @@ public interface BookService {
|
||||
* @return
|
||||
*/
|
||||
Integer addBook(BookModel bookModel) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 用户收藏书籍
|
||||
*
|
||||
* @param bookId 书籍id
|
||||
* @return
|
||||
*/
|
||||
Boolean addFavorites(Integer userId, Integer bookId) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 用户取消收藏书籍
|
||||
* @param userId
|
||||
* @param bookId
|
||||
* @return
|
||||
* @throws BusinessException
|
||||
*/
|
||||
Boolean removeFavorites(Integer userId, Integer bookId) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 获取用户收藏状态
|
||||
* @param userId 用户id
|
||||
* @param bookId 书籍id
|
||||
* @return
|
||||
* @throws BusinessException
|
||||
*/
|
||||
Map getFavoritesStatus(Integer userId, Integer bookId) throws BusinessException;
|
||||
}
|
||||
|
Reference in New Issue
Block a user