commit | author | age
|
a18bfa
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
Z |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|
3 |
<mapper namespace="cn.autoform.fw.mapper.UserManMapper" > |
|
4 |
<cache eviction="FIFO" flushInterval="60000" size="512" readOnly="true"/> |
|
5 |
<select id="findByUsername" resultType="cn.autoform.bean.User" parameterType="cn.autoform.bean.User" useCache="true"> |
|
6 |
select * from user where username = #{username} |
|
7 |
</select> |
|
8 |
|
|
9 |
<insert id = "insert" parameterType="cn.autoform.bean.User" flushCache="true"> |
|
10 |
insert into user(id,username,password,email,lastPasswordResetDate) values (#{id},#{username},#{password},#{email},current_timestamp()) |
|
11 |
</insert> |
|
12 |
|
|
13 |
<select id="findRolesByUserID" resultType="java.lang.String" parameterType="cn.autoform.bean.User" useCache="true"> |
|
14 |
select |
|
15 |
tb2.role |
|
16 |
from |
|
17 |
user tb0 inner join rolemanagement tb1 |
|
18 |
on tb0.id = tb1.user_id |
|
19 |
inner join role tb2 |
|
20 |
on tb1.role_id = tb2.id |
|
21 |
where tb0.id = #{id} |
|
22 |
</select> |
|
23 |
|
|
24 |
<select id="findAll" resultType="cn.autoform.bean.User" useCache="true"> |
|
25 |
select * from user |
|
26 |
</select> |
|
27 |
|
|
28 |
</mapper> |