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.
42 lines
1.2 KiB
42 lines
1.2 KiB
6 years ago
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
<mapper namespace="mapperDAO.BookDAO">
|
||
|
<resultMap id="BookMap" type="domain.BookPO">
|
||
|
<id column="book_id" jdbcType="VARCHAR" property="bookid" />
|
||
|
<result column="book_name" jdbcType="VARCHAR" property="bookname" />
|
||
|
<result column="book_author" jdbcType="VARCHAR" property="bookauthor" />
|
||
|
<result column="book_sort" jdbcType="VARCHAR" property="booksort" />
|
||
|
<result column="book_num" jdbcType="INTEGER" property="booknum" />
|
||
|
<result column="book_image" jdbcType="VARCHAR" property="bookimage" />
|
||
|
|
||
|
</resultMap>
|
||
|
<select id="FindByBookidOrname" resultMap="BookMap" parameterType="String">
|
||
|
SELECT
|
||
|
book.book_id,
|
||
|
book.book_name,
|
||
|
book.book_author,
|
||
|
book.book_num,
|
||
|
book.book_sort,
|
||
|
book.book_image
|
||
|
FROM
|
||
|
book
|
||
|
WHERE
|
||
|
book.book_id=#{search}OR
|
||
|
book.book_name =#{search}
|
||
|
</select>
|
||
|
|
||
|
<select id="FindByBooksort" resultMap="BookMap" parameterType="String">
|
||
|
SELECT
|
||
|
book.book_id,
|
||
|
book.book_name,
|
||
|
book.book_author,
|
||
|
book.book_num,
|
||
|
book.book_sort,
|
||
|
book.book_image
|
||
|
FROM
|
||
|
book
|
||
|
WHERE
|
||
|
book.book_sort='#{search}'
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|