shiro登录、拦截测试成功

This commit is contained in:
fjy8018@qq.com
2018-07-06 15:14:36 +08:00
parent f612e68cfc
commit 14bdaf5989
12 changed files with 150 additions and 9 deletions

View File

@@ -9,15 +9,21 @@
<collection property="roles" ofType="top.fjy8018.shiro.dataobject.Role">
<id property="rid" column="rid" />
<result property="rname" column="rname" />
<collection property="permission" ofType="top.fjy8018.shiro.dataobject.Permission">
<collection property="permissions" ofType="top.fjy8018.shiro.dataobject.Permission">
<id property="pid" column="pid" />
<result property="name" column="name" />
<result property="url" column="url" />
</collection>
</collection>
</resultMap>
<select id="findByUsername" parameterType="string" resultMap="userMap">
<select id="findByUsername" parameterType="java.lang.String" resultMap="userMap">
SELECT u.*,r.*,p.*
FROM user u
INNER JOIN user_role ur ON ur.uid = u.uid
INNER JOIN role r ON ur.uid = r.rid
INNER JOIN permission_role pr ON r.rid = pr.rid
INNER JOIN permission p ON pr.pid = p.pid
WHERE u.username = #{username}
</select>
</mapper>