<?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.yida.data.school.epidemic.mapper.EpidemicRiskAreasDataMapper">

    <select id="findRiskAreaList" resultType="com.yida.data.common.core.entity.epidemic.EpidemicRiskAreasData">
        select * from epidemic_risk_areas_data
        where 1=1
        <if test="name != null and name != ''">
            and `name` like concat ('%',#{name},'%')
        </if>
        <if test="address != null and address != ''">
            and `address` like concat ('%',#{address},'%')
        </if>
        <if test="dept != null and dept != ''">
            and `dept` like concat ('%',#{dept},'%')
        </if>
        <if test="deptId != null">
            and dept_id = #{deptId}
        </if>
        order by id desc
    </select>
</mapper>
