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

    <resultMap type="cn.cecep.talroad.domain.BEnterpriseIrSdoept" id="BEnterpriseIrSdoeptResult">
        <result property="id"    column="id"    />
        <result property="sdoeptType"    column="sdoept_type"    />
        <result property="sdoeptName"    column="sdoept_name"    />
        <result property="sdoeptTitle"    column="sdoept_title"    />
        <result property="sdoeptDetails"    column="sdoept_details"    />
        <result property="sdoeptFileName"    column="sdoept_file_name"    />
        <result property="sdoeptFileUrl"    column="sdoept_file_url"    />
        <result property="sdoeptTime"    column="sdoept_time"    />
    </resultMap>


    <sql id="selectBEnterpriseIrSdoeptVo">
        select id, sdoept_type, sdoept_name, sdoept_title, sdoept_details, sdoept_file_name, sdoept_file_url, sdoept_time from b_enterprise_ir_sdoept
    </sql>

    <select id="selectBEnterpriseIrSdoeptList" parameterType="cn.cecep.talroad.domain.BEnterpriseIrSdoept" resultMap="BEnterpriseIrSdoeptResult">
        <include refid="selectBEnterpriseIrSdoeptVo"/>
        <where>
            <if test="sdoeptType != null  and sdoeptType != ''"> and sdoept_type = #{sdoeptType}</if>
            <if test="sdoeptName != null  and sdoeptName != ''"> and sdoept_name like concat('%', #{sdoeptName}, '%')</if>
            <if test="sdoeptTitle != null  and sdoeptTitle != ''"> and sdoept_title = #{sdoeptTitle}</if>
            <if test="sdoeptDetails != null  and sdoeptDetails != ''"> and sdoept_details = #{sdoeptDetails}</if>
            <if test="sdoeptFileName != null  and sdoeptFileName != ''"> and sdoept_file_name like concat('%', #{sdoeptFileName}, '%')</if>
            <if test="sdoeptFileUrl != null  and sdoeptFileUrl != ''"> and sdoept_file_url = #{sdoeptFileUrl}</if>
            <if test="sdoeptTime != null  and sdoeptTime != ''"> and sdoept_time = #{sdoeptTime}</if>
        </where>
    </select>

</mapper>
