<?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.StatementDetailMapper">
    
    <select id="selectList" resultType="com.ruoyi.web.work.domain.StatementDetail">
        select * from tb_statement_detail
        <where>  
            <if test="statementId != null "> and statement_id = #{statementId}</if>
            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
            <if test="phone != null  and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
            <if test="idCard != null  and idCard != ''"> and id_card like concat('%', #{idCard}, '%')</if>
            <if test="state != null "> and state = #{state}</if>
        </where>
    </select>

</mapper>