<?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.ruoyi.web.work.mapper.UserMapper">
    
    <select id="selectList" resultType="com.ruoyi.web.work.domain.User">
        select * from tb_user
        <where>  
            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
            <if test="phone != null "> and phone = #{phone}</if>
            <if test="idCard != null  and idCard != ''"> and id_card = #{idCard}</if>
            <if test="bankName != null  and bankName != ''"> and bank_name like concat('%', #{bankName}, '%')</if>
            <if test="bankAccount != null  and bankAccount != ''"> and bank_account = #{bankAccount}</if>
            <if test="alipay != null  and alipay != ''"> and alipay = #{alipay}</if>
            <if test="serviceCompany != null  and serviceCompany != ''"> and service_company = #{serviceCompany}</if>
            <if test="isContract != null "> and is_contract = #{isContract}</if>
            <if test="state != null "> and state = #{state}</if>
        </where>
    </select>

</mapper>