1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?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.liang.dao.IndexMapper">
- <!--查询一个用户-->
- <select id="findAccountByUserId" parameterType="java.lang.String" resultType="map">
- select password
- from sys_user_info
- where user_id = #{_parameter}
- </select>
- <!--修改密码-->
- <update id="doUpdatePassword" parameterType="map">
- update sys_user_info
- set password = #{passwordnew}
- where user_id = #{userId}
- </update>
- <!-- 查询所有菜单 -->
- <select id="menuInit" resultType="map">
- select a.permission_id,
- a.parent_id,
- a.name as title,
- a.icon,
- a.href,
- a.type,
- a.target
- from sys_permission_info a
- where a.del_flag = '0'
- and a.status = '0'
- and a.type < 3
- and exists(
- select rp.permission_id
- from sys_role_permission rp
- left join sys_role_info ri on (rp.role_id = ri.role_id)
- where ri.del_flag = '0'
- and ri.status = '0'
- and exists(select ur.role_id
- from sys_user_role ur
- where ur.user_id = #{userId} and rp.role_id = ur.role_id)
- and a.permission_id = rp.permission_id
- )
- order by a.type,
- a.sort,
- a.permission_id
- </select>
- </mapper>
|