2025-06-03 17:18:11 +08:00
|
|
|
<?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.nflg.wms.repository.mapper.UserRoleMapMapper">
|
|
|
|
|
|
2025-06-06 14:58:56 +08:00
|
|
|
<select id="getRoleList" resultType="com.nflg.wms.common.pojo.vo.RoleVO">
|
2025-07-02 11:39:08 +08:00
|
|
|
SELECT distinct r.*
|
2025-06-06 14:58:56 +08:00
|
|
|
FROM user_role_map urm
|
|
|
|
|
INNER JOIN "role" r ON urm.role_id=r."id"
|
|
|
|
|
WHERE urm.user_id=#{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getAuthorizeUser" resultType="com.nflg.wms.common.pojo.vo.UserVO">
|
2025-09-25 09:20:36 +08:00
|
|
|
select u.*,c."name" as dept_name
|
2025-09-03 10:16:53 +08:00
|
|
|
from user_role_map urm
|
|
|
|
|
inner join "user" u on urm.user_id = u.id
|
2025-09-25 09:20:36 +08:00
|
|
|
left join user_interior b on u."id"=b.user_id
|
|
|
|
|
left join department c on b.dept_id=c."id"
|
2025-09-03 10:16:53 +08:00
|
|
|
where urm.role_id = #{roleId}
|
2025-06-06 14:58:56 +08:00
|
|
|
</select>
|
2025-06-20 17:23:34 +08:00
|
|
|
|
|
|
|
|
<select id="getAuthorizeRole" resultType="com.nflg.wms.common.pojo.vo.RoleSimpleVO">
|
|
|
|
|
select r.*
|
|
|
|
|
from user_role_map urm
|
|
|
|
|
inner join role r on urm.role_id = r.id
|
|
|
|
|
where urm.user_id = #{userId}
|
|
|
|
|
</select>
|
2025-06-03 17:18:11 +08:00
|
|
|
</mapper>
|