You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
BookStore/src/com/yj/dao/BookDao.java

115 lines
3.3 KiB

3 years ago
package com.yj.dao;
import com.yj.bean.Book;
import java.math.BigDecimal;
import java.util.List;
/**
* @author yj
* @create 2020-08-23 21:08
3 months ago
*
* BookDao
3 years ago
*/
public interface BookDao {
3 months ago
/**
*
* @param book
* @return 10
*/
3 years ago
public int addBook(Book book);
3 months ago
/**
* ID
* @param id ID
* @return 10
*/
3 years ago
public int deleteBookById(Integer id);
3 months ago
/**
*
* @param book
* @return 10
*/
3 years ago
public int updateBook(Book book);
3 months ago
/**
* ID
* @param id ID
* @return null
*/
3 years ago
public Book queryBookById(Integer id);
3 months ago
/**
*
* @return
*/
3 years ago
public List<Book> queryBooks();
3 months ago
/**
*
* @return
*/
3 years ago
Integer queryForPageTotalCount();
3 months ago
/**
*
* @param begin
* @param pageSize
* @return
*/
3 years ago
List<Book> queryForPageItems(int begin, int pageSize);
3 months ago
/**
*
* @param min
* @param max
* @return
*/
3 years ago
Integer queryForPageTotalCountByPrice(int min, int max);
3 months ago
/**
*
* @param begin
* @param pageSize
* @param min
* @param max
* @return
*/
3 years ago
List<Book> queryForPageItemsByPrice(int begin, int pageSize, int min, int max);
3 months ago
/**
*
* @param nameorauthor
* @return
*/
3 years ago
Integer queryForPageTotalCountByNameOrAuthor(String nameorauthor);
3 months ago
/**
*
* @param begin
* @param pageSize
* @param nameorauthor
* @return
*/
3 years ago
List<Book> queryForPageItemsByNameOrAuthor(int begin, int pageSize, String nameorauthor);
3 months ago
/**
*
* @return
*/
3 years ago
List<Book> queryForPageItemsOrder();
3 months ago
/**
*
* @return
*/
3 years ago
BigDecimal queryTotalMoney();
3 months ago
/**
*
* @return
*/
3 years ago
public Integer queryBooknums();
3 months ago
}