<?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="org.jeecg.modules.activiti.mapper.ActNodeMapper">

    <select id="findUserByNodeId" resultType="org.jeecg.common.system.vo.LoginUser">
        select * from sys_user
        where username in (select relate_id from act_z_node where node_id = #{nodeId} and type = 1)
            and del_flag = 0
    </select>
    <select id="findRoleByNodeId" resultType="org.jeecg.modules.activiti.entity.Role">
        select * from sys_role
        where role_code in (select relate_id from act_z_node where node_id = #{nodeId} and type = 0)
    </select>
    <select id="findDepartmentByNodeId" resultType="org.jeecg.modules.activiti.entity.Department">
        select * from sys_depart
        where id in (select relate_id from act_z_node where node_id = #{nodeId} and type = 2)
            and del_flag = 0
    </select>
</mapper>
