<?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.dromara.mapper.StaffManageMapper">

    <resultMap type="org.dromara.domain.staffManage.vo.StaffManageVo" id="StaffManageResult">
        <id property="staffId" column="staff_id"/>
    </resultMap>

    <sql id="selectStaffManageVo">
        select  s.staff_id,s.tenant_id,s.user_id,s.staff_name,s.gender,s.staff_category,s.maintenance_category
        ,s.phone_number,s.avatar_photo,s.id_card,s.id_card_front,s.id_card_back,s.certificate,s.status,s.examine
        ,s.create_time
        from staff_manage s
    </sql>

    <select id="getInfoByUserId" resultMap="StaffManageResult">
        <include refid="selectStaffManageVo"></include>
        where s.user_id = #{userId}
    </select>

</mapper>
