1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-14 20:41:38 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

添加用户收藏书籍、取消收藏书籍、获取书籍收藏状态功能(后端+数据库);更新Api文档

This commit is contained in:
2022-04-05 18:21:49 +08:00
parent 8598edc0f7
commit cf26e925d9
11 changed files with 852 additions and 10 deletions

View File

@@ -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;
}