<?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="cn.cecep.talroad.mapper.BEnterpriseIrEesMapper">

    <resultMap type="cn.cecep.talroad.domain.BEnterpriseIrEes" id="BEnterpriseIrEesResult">
        <result property="id"    column="id"    />
        <result property="eesClassify"    column="ees_classify"    />
        <result property="eesType"    column="ees_type"    />
        <result property="eesName"    column="ees_name"    />
        <result property="eesTitle"    column="ees_title"    />
        <result property="eesDetails"    column="ees_details"    />
        <result property="eesFileName"    column="ees_file_name"    />
        <result property="eesFileUrl"    column="ees_file_url"    />
        <result property="eesTime"    column="ees_time"    />
    </resultMap>


    <sql id="selectBEnterpriseIrEesVo">
        select id, ees_classify, ees_type, ees_name, ees_title, ees_details, ees_file_name, ees_file_url, ees_time from b_enterprise_ir_ees
    </sql>

    <select id="selectBEnterpriseIrEesList" parameterType="cn.cecep.talroad.domain.BEnterpriseIrEes" resultMap="BEnterpriseIrEesResult">
        <include refid="selectBEnterpriseIrEesVo"/>
        <where>
            <if test="eesClassify != null  and eesClassify != ''"> and ees_classify = #{eesClassify}</if>
            <if test="eesType != null  and eesType != ''"> and ees_type = #{eesType}</if>
            <if test="eesName != null  and eesName != ''"> and ees_name like concat('%', #{eesName}, '%')</if>
            <if test="eesTitle != null  and eesTitle != ''"> and ees_title = #{eesTitle}</if>
            <if test="eesDetails != null  and eesDetails != ''"> and ees_details = #{eesDetails}</if>
            <if test="eesFileName != null  and eesFileName != ''"> and ees_file_name like concat('%', #{eesFileName}, '%')</if>
            <if test="eesFileUrl != null  and eesFileUrl != ''"> and ees_file_url = #{eesFileUrl}</if>
            <if test="eesTime != null  and eesTime != ''"> and ees_time = #{eesTime}</if>
        </where>
    </select>

</mapper>
