配置数据库、编写SQL语句和基础类

This commit is contained in:
fjy8018@qq.com
2018-07-06 09:52:17 +08:00
parent a41b44f78e
commit e5e783256f
11 changed files with 208 additions and 1 deletions

View File

@@ -0,0 +1,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="top.fjy8018.shiro.mapper.UserMapper">
<resultMap id="userMap" type="top.fjy8018.shiro.dataobject.User" >
<id property="uid" column="uid"/>
<result property="username" column="username" />
<result property="password" column="password" />
<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">
<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>
</mapper>