<?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.hzs.system.sys.mapper.SysApprovalSendMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hzs.common.domain.system.sys.SysApprovalSend">
        <result column="PK_APPROVAL" property="pkApproval"/>
        <result column="PK_USER" property="pkUser"/>
    </resultMap>

    <!-- 根据审批查询列表 -->
    <select id="queryListByApproval" resultType="com.hzs.common.domain.system.sys.ext.SysApprovalSendExt">
        select sas.*, su.nick_name, su.user_name, sd.dept_name
        from SYS_APPROVAL_SEND sas
        left join sys_user su
        on su.user_id = sas.pk_user
        left join sys_dept sd
        on sd.dept_id = su.pk_dept
        where sas.pk_approval in
        <foreach collection="pkApprovalList" item="item" open="(" close=")" separator=",">
            #{item}
        </foreach>
    </select>

</mapper>
