<?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.modules.desk.mapper.PlatformUserMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="platformUserResultMap" type="org.springblade.modules.desk.entity.PlatformUser">
        <id column="id" property="id"/>
        <result column="phone" property="phone"/>
        <result column="user_password" property="userPassword"/>
        <result column="zmt_id" property="zmtId"/>
        <result column="zmt_user_id" property="zmtUserId"/>
        <result column="breed_code" property="breedCode"/>
        <result column="zmt_user_name" property="zmtUserName"/>
        <result column="zmt_name" property="zmtName"/>
        <result column="zmt_type" property="zmtType"/>
        <result column="type" property="type"/>
        <result column="state" property="state"/>
        <result column="business_link_man" property="businessLinkMan"/>
        <result column="user_name" property="userName"/>
        <result column="prov_id" property="provId"/>
        <result column="prov_name" property="provName"/>
        <result column="city_id" property="cityId"/>
        <result column="city_name" property="cityName"/>
        <result column="area_id" property="areaId"/>
        <result column="area_name" property="areaName"/>
        <result column="address" property="address"/>
        <result column="business_industry_categrory" property="businessIndustryCategrory"/>
        <result column="business_legal_person" property="businessLegalPerson"/>
        <result column="business_register_money" property="businessRegisterMoney"/>
        <result column="business_register_date" property="businessRegisterDate"/>
        <result column="business_term" property="businessTerm"/>
        <result column="business_scope" property="businessScope"/>
        <result column="credit_code" property="creditCode"/>
        <result column="business_url" property="businessUrl"/>
        <result column="id_card_front_url" property="idCardFrontUrl"/>
        <result column="id_card_behind_url" property="idCardBehindUrl"/>
        <result column="livestock_prevention_pass_code" property="livestockPreventionPassCode"/>
        <result column="livestock_prevention_pass_url" property="livestockPreventionPassUrl"/>
        <result column="livestock_slaughter_permit_code" property="livestockSlaughterPermitCode"/>
        <result column="livestock_slaughter_permit_url" property="livestockSlaughterPermitUrl"/>
        <result column="pollutant_discharge_permit_code" property="pollutantDischargePermitCode"/>
        <result column="pollutant_discharge_permit_industry" property="pollutantDischargePermitIndustry"/>
        <result column="pollutant_discharge_permit_date" property="pollutantDischargePermitDate"/>
        <result column="pollutant_discharge_permit_license_url" property="pollutantDischargePermitLicenseUrl"/>
        <result column="no_epidemic_proof_pass_date" property="noEpidemicProofPassDate"/>
        <result column="no_epidemic_proof_pass_url" property="noEpidemicProofPassUrl"/>
        <result column="driver_licence_code" property="driverLicenceCode"/>
        <result column="driver_licence_url" property="driverLicenceUrl"/>
        <result column="driver_car_type" property="driverCarType"/>
        <result column="driver_issuing" property="driverIssuing"/>
        <result column="driver_first_issue_date" property="driverFirstIssueDate"/>
        <result column="driver_licence_expiry_date" property="driverLicenceExpiryDate"/>
        <result column="vehicle_license_code" property="vehicleLicenseCode"/>
        <result column="vehicle_license_url" property="vehicleLicenseUrl"/>
        <result column="transport_permit_code" property="transportPermitCode"/>
        <result column="transport_permit_url" property="transportPermitUrl"/>
        <result column="slaughter_house_parent_id" property="slaughterHouseParentId"/>
        <result column="slaughter_house_parent_name" property="slaughterHouseParentName"/>
        <result column="slaughter_house_type" property="slaughterHouseType"/>
        <result column="version" property="version"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="created_time" property="createdTime"/>
        <result column="creator" property="creator"/>
        <result column="modified_time" property="modifiedTime"/>
        <result column="modifier" property="modifier"/>
    </resultMap>


    <select id="selectPlatformUserPage" resultMap="platformUserResultMap">
        select * from tb_user where is_deleted = 0
    </select>

    <select id="exportPlatformUser" resultType="org.springblade.modules.desk.excel.PlatformUserExcel">
        select * from tb_user where is_deleted = 0 and creator = "system"
    </select>

</mapper>
