forked from Jaehyunleejava/BoardSpringMVC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserMapper.xml
More file actions
36 lines (27 loc) · 844 Bytes
/
userMapper.xml
File metadata and controls
36 lines (27 loc) · 844 Bytes
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
34
<?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.jh.mapper.UserMapper">
<select id="login" resultType="UserVO">
select uid, upw, uname
from tbl_user
where uid = #{uid} and upw = #{upw}
</select>
<update id="keepLogin">
update tbl_user
set sessionkey = #{sessionId}, sessionlimit = #{next}
where uid = #{uid}
</update>
<select id="checkUserWithSessionKey" resultType="UserVO">
select *
from tbl_user
where sessionkey = #{value} and sessionlimit > now()
</select>
<insert id="joinUs">
insert into tbl_user(uid, upw, uname) values (#{uid},#{upw},#{uname})
</insert>
<select id="idCheck" resultType="UserVO">
select uid from tbl_user where uid = #{uid}
</select>
</mapper>