<?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.sunxung.factoring.mapper.financing.contract.ElectronicPersonInfoMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.sunxung.factoring.entity.financing.contract.ElectronicPersonInfo">
        <result column="id" property="id"/>
        <result column="user_create" property="userCreate"/>
        <result column="user_modified" property="userModified"/>
        <result column="gmt_create" property="gmtCreate"/>
        <result column="gmt_modified" property="gmtModified"/>
        <result column="name" property="name"/>
        <result column="socialCreditCode" property="socialCreditCode"/>
        <result column="mobile" property="mobile"/>
        <result column="email" property="email"/>
        <result column="card_type" property="cardTypeId"/>
        <result column="card_front_file_storage_id" property="cardFrontFileStorageId"/>
        <result column="card_reverse_file_storage_id" property="cardReverseFileStorageId"/>
    </resultMap>
    <select id="getBySocialCreditCode" resultMap="BaseResultMap">
        select * from electronic_person_info a
        left join sys_customer b on b.ent_business_id = a.id
        where a.socialCreditCode = #{value}
        and b.account_type = 1
    </select>


</mapper>
