<?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.ssm.manage.mapper.BeisenUserListMapper">

    <resultMap id="BaseResultMap" type="com.ssm.manage.entity.BeisenUserList">
        <result property="id" column="id"/>
        <result property="beisenUserId" column="beisen_user_id"/>
        <result property="staffNum" column="staff_num"/>
        <result property="staffName" column="staff_name"/>
        <result property="email" column="email"/>
        <result property="mobilePhone" column="mobile_phone"/>
        <result property="job" column="job"/>
        <result property="sex" column="sex"/>
        <result property="identityCard" column="identity_card"/>
        <result property="storeId" column="store_id"/>
        <result property="inputId" column="input_id"/>
        <result property="inputName" column="input_name"/>
        <result property="inputDate" column="input_date"/>
        <result property="type" column="type"/>
        <result property="facesInformation" column="faces_information"/>
        <result property="regionId" column="region_id"/>
        <result property="endType" column="end_type"/>
        <result property="endId" column="end_id"/>
        <result property="endName" column="end_name"/>
        <result property="endTime" column="end_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="employeeInformationId" column="employee_information_id"/>
        <result property="employmentRecordId" column="employment_record_id"/>
        <result property="isBeisen" column="is_beisen"/>
        <result property="isZhongkong" column="is_zhongkong"/>
        <result property="originalId" column="original_id"/>
    </resultMap>

    <sql id="Base_Column_List">
        id
        , beisen_user_id, staff_num, staff_name, email, mobile_phone, job, sex,
            identity_card, store_id, input_id, input_name, input_date, type,
            faces_information, region_id, end_type, end_id, end_name, end_time,
            update_time, employee_information_id, employment_record_id, is_beisen, is_zhongkong,
            original_id
    </sql>

    <select id="queryAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"></include>
        from beisen_user_list
        <where>
            <if test="id != null">
                and id = #{id}
            </if>
            <if test="beisenUserId != null">
                and beisen_user_id = #{beisenUserId}
            </if>
            <if test="staffNum != null and staffNum != ''">
                and staff_num = #{staffNum}
            </if>
            <if test="staffName != null and staffName != ''">
                and staff_name = #{staffName}
            </if>
            <if test="email != null and email != ''">
                and email = #{email}
            </if>
            <if test="mobilePhone != null and mobilePhone != ''">
                and mobile_phone = #{mobilePhone}
            </if>
            <if test="job != null">
                and job = #{job}
            </if>
            <if test="sex != null">
                and sex = #{sex}
            </if>
            <if test="identityCard != null and identityCard != ''">
                and identity_card = #{identityCard}
            </if>
            <if test="storeId != null">
                and store_id = #{storeId}
            </if>
            <if test="inputId != null">
                and input_id = #{inputId}
            </if>
            <if test="inputName != null and inputName != ''">
                and input_name = #{inputName}
            </if>
            <if test="inputDate != null">
                and input_date = #{inputDate}
            </if>
            <if test="type != null">
                and type = #{type}
            </if>
            <if test="facesInformation != null and facesInformation != ''">
                and faces_information = #{facesInformation}
            </if>
            <if test="regionId != null">
                and region_id = #{regionId}
            </if>
            <if test="endType != null">
                and end_type = #{endType}
            </if>
            <if test="endId != null">
                and end_id = #{endId}
            </if>
            <if test="endName != null and endName != ''">
                and end_name = #{endName}
            </if>
            <if test="endTime != null">
                and end_time = #{endTime}
            </if>
            <if test="updateTime != null">
                and update_time = #{updateTime}
            </if>
            <if test="employeeInformationId != null and employeeInformationId != ''">
                and employee_information_id = #{employeeInformationId}
            </if>
            <if test="employmentRecordId != null and employmentRecordId != ''">
                and employment_record_id = #{employmentRecordId}
            </if>
            <if test="isBeisen != null">
                and is_beisen = #{isBeisen}
            </if>
            <if test="isZhongkong != null">
                and is_zhongkong = #{isZhongkong}
            </if>
        </where>
    </select>


</mapper>
