<?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.yida.data.auth.mapper.UserMenuMapper">
	
	<select id="findUserPermissions" resultType="com.yida.data.common.core.entity.system.SystemUserMenu">
    select um.*, m.perms
    from t_user_menu um
           left join t_user u on (u.user_id = um.user_id)
           left join t_menu m on (m.menu_id = um.menu_id)
    where u.username = #{userName}
      and m.perms is not null
      and m.perms <![CDATA[!=]]> ''
	</select>
</mapper>