forked from JoyChou93/java-sec-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserMapper.xml
More file actions
23 lines (18 loc) · 928 Bytes
/
UserMapper.xml
File metadata and controls
23 lines (18 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?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="org.joychou.mapper.UserMapper">
<resultMap type="org.joychou.dao.User" id="User">
<id column="id" property="id" javaType="java.lang.Integer" jdbcType="NUMERIC"/>
<id column="username" property="username" javaType="java.lang.String" jdbcType="VARCHAR"/>
<id column="password" property="password" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
<!--<select id="findByUserName" resultMap="User">-->
<!--select * from users where username = #{username}-->
<!--</select>-->
<select id="findById" resultMap="User">
select * from users where id = #{id}
</select>
<select id="OrderByUsername" resultMap="User">
select * from users order by id asc limit 1
</select>
</mapper>