|
|
@ -20,10 +20,12 @@ public interface BookMapper {
|
|
|
|
|
|
|
|
|
|
|
|
@Select("select * from book")
|
|
|
|
@Select("select * from book")
|
|
|
|
Book[] getAll();
|
|
|
|
Book[] getAll();
|
|
|
|
@Select("select * from book where bookname=#{bookname}")
|
|
|
|
@Select("select * from book where bookname like '%${bookname}%' ")
|
|
|
|
Book[] searchBooks(String bookname);
|
|
|
|
Book[] searchBooks(String bookname);
|
|
|
|
@Delete("delete from book where bookname=#{bookname}")
|
|
|
|
@Delete("delete from book where bookname=#{bookname}")
|
|
|
|
int deleteByBookName(String bookname);
|
|
|
|
int deleteByBookName(String bookname);
|
|
|
|
@Insert("insert into book (bookname,kind,price) values (#{bookname},#{kind},#{price})")
|
|
|
|
@Insert("insert into book (bookname,kind,price) values (#{bookname},#{kind},#{price})")
|
|
|
|
int Insert(Book book);
|
|
|
|
int Insert(Book book);
|
|
|
|
|
|
|
|
@Select("select * from book where bookname=#{bookname}")
|
|
|
|
|
|
|
|
Book searchBookbyName(String bookname);
|
|
|
|
}
|
|
|
|
}
|
|
|
|