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

    <resultMap type="cn.cecep.talroad.domain.PcMenuFactory" id="PcMenuFactoryResult">
        <result property="id"    column="id"    />
        <result property="factoryId"    column="factory_id"    />
        <result property="menuId"    column="menu_id"    />
        <result property="menuIfUse"    column="menu_if_use"    />
        <result property="menuFocus"    column="menu_focus"    />
        <result property="menuFocusIndex"    column="menu_focus_index"    />
    </resultMap>


    <sql id="selectPcMenuFactoryVo">
        select id, factory_id, menu_id, menu_if_use, menu_focus, menu_focus_index from pc_menu_factory
    </sql>

    <select id="selectPcMenuFactoryList" parameterType="cn.cecep.talroad.domain.PcMenuFactory" resultMap="PcMenuFactoryResult">
        <include refid="selectPcMenuFactoryVo"/>
        <where>
            <if test="factoryId != null  and factoryId != ''"> and factory_id = #{factoryId}</if>
            <if test="menuId != null  and menuId != ''"> and menu_id = #{menuId}</if>
            <if test="menuIfUse != null  and menuIfUse != ''"> and menu_if_use = #{menuIfUse}</if>
            <if test="menuFocus != null  and menuFocus != ''"> and menu_focus = #{menuFocus}</if>
            <if test="menuFocusIndex != null  and menuFocusIndex != ''"> and menu_focus_index = #{menuFocusIndex}</if>
        </where>
    </select>

</mapper>
