<?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.ruoyi.mingxue.mapper.MxjbTagExtMapper">
    
    <resultMap type="MxjbTagExt" id="MxjbTagExtResult">
        <result property="menuId"    column="menu_id"    />
        <result property="info"    column="info"  typeHandler="com.ruoyi.mingxue.handlers.MxjbTagExtInfoHandler"   />
    </resultMap>

    <sql id="selectMxjbTagExtVo">
        select menu_id, info from mxjb_tag_ext
    </sql>

    <select id="selectMxjbTagExtList" parameterType="MxjbTagExt" resultMap="MxjbTagExtResult">
        <include refid="selectMxjbTagExtVo"/>
        <where>  
            <if test="info != null  and info != ''"> and info = #{info}</if>
        </where>
    </select>

    <select id="selectMxjbTagExtById" parameterType="Long" resultMap="MxjbTagExtResult">
        <include refid="selectMxjbTagExtVo"/>
        where menu_id = #{menuId}
    </select>
        
    <insert id="insertMxjbTagExt" parameterType="MxjbTagExt">
        insert into mxjb_tag_ext
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="menuId != null">menu_id,</if>
            <if test="info != null">info,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="menuId != null">#{menuId},</if>
            <if test="info != null">#{info, typeHandler=com.ruoyi.mingxue.handlers.MxjbTagExtInfoHandler},</if>
         </trim>
    </insert>

    <update id="updateMxjbTagExt" parameterType="MxjbTagExt">
        update mxjb_tag_ext
        <trim prefix="SET" suffixOverrides=",">
            <if test="info != null">info = #{info, typeHandler=com.ruoyi.mingxue.handlers.MxjbTagExtInfoHandler},</if>
        </trim>
        where menu_id = #{menuId}
    </update>

    <delete id="deleteMxjbTagExtById" parameterType="Long">
        delete from mxjb_tag_ext where menu_id = #{menuId}
    </delete>

    <delete id="deleteMxjbTagExtByIds" parameterType="String">
        delete from mxjb_tag_ext where menu_id in 
        <foreach item="menuId" collection="array" open="(" separator="," close=")">
            #{menuId}
        </foreach>
    </delete>
</mapper>