<?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.usky.eg.mapper.SysPersonMapper">

    <resultMap id="BaseResultMap" type="com.usky.eg.domain.SysPerson">
        <id column="id" property="id"/>
        <result column="full_name" property="fullName"/>
        <result column="age" property="age"/>
        <result column="gender" property="gender"/>
        <result column="address" property="address"/>
        <result column="education_degree" property="educationDegree"/>
        <result column="id_number" property="idNumber"/>
        <result column="link_phone" property="linkPhone"/>
        <result column="post_id" property="postId"/>
        <result column="dept_id" property="deptId"/>
        <result column="entry_time" property="entryTime"/>
        <result column="certificate_url1" property="certificateUrl1"/>
        <result column="certificate_url2" property="certificateUrl2"/>
        <result column="certificate_url3" property="certificateUrl3"/>
        <result column="creator" property="creator"/>
        <result column="create_time" property="createTime"/>
        <result column="update_person" property="updatePerson"/>
        <result column="update_time" property="updateTime"/>
        <result column="face_base" property="faceBase"/>
        <result column="vef_num" property="vefNum"/>
        <result column="face_name" property="faceName"/>
        <result column="remark" property="remark"/>
        <result column="face_status" property="faceStatus"/>
        <result column="card_num" property="cardNum"/>
    </resultMap>

    <select id="selectUserIdsByPersonIds" resultType="java.util.HashMap">
        select person_id as personId, user_id as userId
        from sys_user_person
        <where>
            <if test="personIds != null and personIds.size() > 0">
                and person_id in
                <foreach collection="personIds" item="id" open="(" separator="," close=")">
                    #{id}
                </foreach>
            </if>
        </where>
    </select>

</mapper>
