forked from zhanghuanhao/LibrarySystem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f83f399
commit 59fdfaa
Showing
2 changed files
with
53 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?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="com.library.dao.ReaderCardDao"> | ||
<select id="getIdMatchCount" resultType="int"> | ||
select count(*) from reader_card where | ||
reader_id = #{reader_id} and password = #{password} | ||
</select> | ||
<select id="findReaderByReaderId" resultType="com.library.bean.ReaderCard" parameterType="long"> | ||
select * from reader_card where reader_id = #{reader_id} | ||
</select> | ||
<update id="resetPassword"> | ||
update reader_card set password = #{password} | ||
where reader_id = #{reader_id} | ||
</update> | ||
<select id="getPassword" resultType="String" parameterType="long"> | ||
select password from reader_card where reader_id = #{reader_id} | ||
</select> | ||
<insert id="addReaderCard"> | ||
insert into reader_card values | ||
(#{reader_id}, #{username}, #{password}) | ||
</insert> | ||
</mapper> |