master
parent
315b1cc89d
commit
b0974ef94b
@ -0,0 +1 @@
|
||||
INSERT INTO `user_list` VALUES ('admin1', 'admin1', 1);
|
@ -1,10 +1,23 @@
|
||||
package com.book.demo.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.book.demo.entity.Book;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface BookMapper {
|
||||
|
||||
@Select("select * from book_list where classify=#{classify}")
|
||||
Book[] getBooksByKind(String kind);
|
||||
|
||||
@Select("select * from book_list")
|
||||
Book[] getAll();
|
||||
@Select("select * from book_list where bookname=#{bookname}")
|
||||
Book[] searchBooks(String bookname);
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in new issue