<?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.springblade.enterprise.mapper.StaffMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="staffResultMap" type="org.springblade.enterprise.entity.Staff">
        <result column="id" property="id"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="name" property="name"/>
        <result column="real_name" property="realName"/>
        <result column="email" property="email"/>
        <result column="avatar" property="avatar"/>
        <result column="phone" property="phone"/>
        <result column="birthday" property="birthday"/>
        <result column="face_url" property="faceUrl"/>
        <result column="idcard" property="idcard"/>
        <result column="sex" property="sex"/>
        <result column="address" property="address"/>
        <result column="audit_time" property="auditTime"/>
        <result column="audit_status" property="auditStatus"/>
        <result column="audit_opinion" property="auditOpinion"/>
        <result column="enterprise_id" property="enterpriseId"/>
        <result column="enterprise_name" property="enterpriseName"/>
        <result column="enterprise_dept_id" property="enterpriseDeptId"/>
        <result column="enterprise_dept_name" property="enterpriseDeptName"/>
        <result column="agency_id" property="agencyId"/>
        <result column="residential_id" property="residentialId"/>
        <result column="agency_name" property="agencyName"/>
        <result column="residential_name" property="residentialName"/>
        <result column="open_id" property="openId"/>
        <result column="dept_id" property="deptId"/>
        <result column="post_id" property="postId"/>
        <result column="remarks" property="remarks"/>
        <result column="create_type" property="createType"/>
        <result column="org_position" property="orgPosition"/>
        <result column="is_agency_manager" property="isAgencyManager"/>
        <result column="agency_account" property="agencyAccount"/>
        <result column="agency_password" property="agencyPassword"/>
        <result column="is_enterprise_manager" property="isEnterpriseManager"/>
        <result column="enterprise_account" property="enterpriseAccount"/>
        <result column="enterprise_password" property="enterprisePassword"/>
        <result column="tenant_id" property="tenantId"/>
    </resultMap>


    <select id="selectStaffPage" resultMap="staffResultMap">
        select * from enterprise_staff where is_deleted = 0
    </select>

</mapper>
