workflow/src/main/resources/mapper/RoleMapper.xml
yulinling 8935c9f0c5 feat:
- 使用自定义UserDetail
2025-06-15 23:20:28 +08:00

11 lines
520 B
XML

<?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="asia.yulinling.workflow.mapper.RoleMapper">
<select id="selectRoleByUserId" resultType="asia.yulinling.workflow.model.entity.Role">
SELECT DISTINCT r.*
FROM wk_role r
JOIN wk_role_user ur ON r.id = ur.role_id
JOIN wk_user u ON u.id = ur.user_id
WHERE u.id = #{userId}
</select>
</mapper>