<?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.NextOfKinMapper">


    <select id="selectList" resultType="com.ruoyi.web.work.domain.NextOfKin">
      select * from tb_next_of_kin
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
            <if test="patId != null "> and pat_id = #{patId}</if>
            <if test="kinship != null  and kinship != ''"> and kinship = #{kinship}</if>
            <if test="address != null  and address != ''"> and address = #{address}</if>
            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
            <if test="workName != null  and workName != ''"> and work_name like concat('%', #{workName}, '%')</if>
            <if test="workCode != null  and workCode != ''"> and work_code = #{workCode}</if>
        </where>
    </select>

</mapper>
