forked from whgojp/JavaSecLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserMapper.xml
More file actions
33 lines (31 loc) · 1.18 KB
/
UserMapper.xml
File metadata and controls
33 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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="top.whgojp.modules.system.mapper.UserMapper">
<resultMap id="BaseResultMap" type="top.whgojp.modules.system.entity.User">
<result property="username" column="username" jdbcType="VARCHAR"/>
<result property="password" column="password" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
username,password
</sql>
<select id="selectByUsernameAndPassword" resultType="top.whgojp.modules.system.entity.User">
select
*
from user
where
username = #{username,jdbcType=VARCHAR}
AND password = #{password,jdbcType=VARCHAR}
</select>
<update id="updatePasswordByUsername">
update user
set password = #{password,jdbcType=VARCHAR}
where username = #{username,jdbcType=VARCHAR}
</update>
<select id="getAllByUsername" resultType="top.whgojp.modules.system.entity.User">
select *
from user
where username = #{username,jdbcType=VARCHAR}
</select>
</mapper>