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

    <select id="epidemicKnowledgeList"
            resultType="com.yida.data.common.core.entity.epidemic.EpidemicKnowledgeData">
        SELECT * FROM epidemic_knowledge_data

        WHERE dept_id = #{deptId}
        <if test="type != null ">
            and `type` = #{type}
        </if>
        <if test="title != null and title != ''">
           and  title like concat('%', #{title},'%')
        </if>
        order by create_date desc
    </select>
</mapper>
