| | |
| | | r.create_time, |
| | | r.remark |
| | | from sys_role r |
| | | left join sys_user_role ur on ur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = ur.user_id |
| | | left join sys_user_role sur on sur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = sur.user_id |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | </sql> |
| | | |
| | |
| | | |
| | | <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | WHERE r.del_flag = '0' and ur.user_id = #{userId} |
| | | WHERE r.del_flag = '0' and sur.user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="selectRoleListByUserId" parameterType="Long" resultType="Long"> |
| | | select r.role_id |
| | | from sys_role r |
| | | left join sys_user_role ur on ur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = ur.user_id |
| | | left join sys_user_role sur on sur.role_id = r.role_id |
| | | left join sys_user u on u.user_id = sur.user_id |
| | | where u.user_id = #{userId} |
| | | </select> |
| | | |