<?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.customerinformation.ElectronicSignaturePersonalMapper">

    <select id="findByComName" resultType="com.sunxung.factoring.entity.entprise.Enterprise">
        select * from c_enterprise
        <where>
            <if test="name != null and name !=''">
                corporate_name like CONCAT('%',#{name} ,'%' ) or social_credit_code like CONCAT('%',#{name} ,'%' )
            </if>
            <if test="status != null">
                and auth_status = #{status}
            </if>
        </where>
        order by gmt_create desc
    </select>

    <select id="findByName" resultType="com.sunxung.factoring.entity.customerinformation.ElectronicSignaturePersonal">
        select * from electronic_signature_personal
        <where>
            <if test="name != null and name !=''">
                name like CONCAT('%',#{name} ,'%' ) or socialCreditCode like CONCAT('%',#{name} ,'%' )
            </if>
            <if test="status != null">
                and auth_status = #{status}
            </if>
        </where>
        order by gmt_create desc
    </select>
</mapper>