parent
3a0f46a143
commit
6cfc5bfab7
@ -0,0 +1,37 @@
|
||||
<?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.tamguo.modules.sys.dao.SysMenuMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.tamguo.modules.sys.model.SysMenuEntity" >
|
||||
<id column="uid" property="uid" jdbcType="VARCHAR" />
|
||||
<result column="parent_id" property="parentId" jdbcType="BIGINT" />
|
||||
<result column="name" property="name" jdbcType="VARCHAR" />
|
||||
<result column="url" property="url" jdbcType="VARCHAR" />
|
||||
<result column="type" property="type" jdbcType="INTEGER" />
|
||||
<result column="perms" property="perms" jdbcType="INTEGER" />
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER" />
|
||||
<result column="parentName" property="parentName" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List" >
|
||||
uid, parent_id, name, url, type, perms , order_num
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="queryList" resultMap="BaseResultMap">
|
||||
select m.*,(select p.name from sys_menu p where p.uid = m.parent_id) as parentName
|
||||
from sys_menu m order by m.order_num asc
|
||||
</select>
|
||||
|
||||
<select id="queryNotButtonList" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List" />
|
||||
from sys_menu where type != 2 order by order_num asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryByUid" resultMap="BaseResultMap">
|
||||
select m.*,(select p.name from sys_menu p where p.uid = m.parent_id) as parentName
|
||||
from sys_menu m where m.uid = #{uid}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,17 @@
|
||||
<?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.tamguo.modules.sys.dao.SysRoleMapper">
|
||||
|
||||
<select id="selectPageByName" resultType="SysRoleEntity">
|
||||
SELECT
|
||||
r.uid , r.name , r.perms
|
||||
FROM
|
||||
sys_role r
|
||||
<where>
|
||||
<if test="name!=null and name !=''">
|
||||
t.name like #{name}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,44 @@
|
||||
<?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.tamguo.modules.sys.dao.SysUserMapper">
|
||||
|
||||
<select id="queryByUserName" resultType="SysUserEntity">
|
||||
SELECT
|
||||
u.uid,
|
||||
u.user_name,
|
||||
u.role_ids,
|
||||
u.password,
|
||||
u.status,
|
||||
u.nick_name,
|
||||
u.mobile,
|
||||
u.email,
|
||||
u.course_id
|
||||
FROM
|
||||
sys_user u
|
||||
WHERE
|
||||
u.user_name = #{username}
|
||||
</select>
|
||||
|
||||
<select id="queryPage" resultType="SysUserEntity">
|
||||
SELECT
|
||||
u.uid,
|
||||
u.user_name,
|
||||
u.role_ids,
|
||||
r.name as role_name,
|
||||
u.password,
|
||||
u.status,
|
||||
u.nick_name,
|
||||
u.mobile,
|
||||
u.email,
|
||||
u.course_id
|
||||
FROM
|
||||
sys_user u
|
||||
LEFT JOIN sys_role r ON r.uid = u.role_ids
|
||||
<where>
|
||||
<if test="userName != null and userName != ''">
|
||||
u.user_name like #{userName}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -1 +1 @@
|
||||
lang='zh_CN',ctx='/js',ctxPath='/js',ctxAdmin='/js/a',ctxFront='/js/f',ctxStatic='/js/static',Global={SHOW:'1',HIDE:'0',OP_AUTH:'auth',OP_ADD:'add',FALSE:'false',USERFILES_BASE_URL:'/userfiles/',YES:'1',TRUE:'true',NO:'0',OP_EDIT:'edit',STATUS_DELETE:'1',STATUS_NORMAL:'0',STATUS_DRAFT:'9',STATUS_AUDIT_BACK:'5',STATUS_DISABLE:'2',STATUS_FREEZE:'3',STATUS_AUDIT:'4'}
|
||||
lang='zh_CN',ctx='http://localhost/',ctxPath='/',ctxAdmin='/',ctxFront='/f',ctxStatic='static',Global={SHOW:'1',HIDE:'0',OP_AUTH:'auth',OP_ADD:'add',FALSE:'false',USERFILES_BASE_URL:'/userfiles/',YES:'1',TRUE:'true',NO:'0',OP_EDIT:'edit',STATUS_DELETE:'1',STATUS_NORMAL:'0',STATUS_DRAFT:'9',STATUS_AUDIT_BACK:'5',STATUS_DISABLE:'2',STATUS_FREEZE:'3',STATUS_AUDIT:'4'}
|
Loading…
Reference in new issue