<?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.willalp.canteen.mapper.HsCanteenMenuCustomMapper">

    <resultMap type="HsCanteenMenuCustom" id="HsCanteenMenuCustomResult">
        <result property="customId" column="custom_id"/>
        <result property="menuNumber" column="menu_number"/>
        <result property="cuisineNumber" column="cuisine_number"/>
        <result property="customName" column="custom_name"/>
        <result property="jgid" column="jgid"/>
        <result property="isDelete" column="is_delete"/>
    </resultMap>

    <sql id="selectHsCanteenMenuCustomVo">
        select custom_id, menu_number, cuisine_number, custom_name, jgid, is_delete from hs_canteen_menu_custom
    </sql>

    <select id="selectHsCanteenMenuCustomList" parameterType="HsCanteenMenuCustom"
            resultMap="HsCanteenMenuCustomResult">
        <include refid="selectHsCanteenMenuCustomVo"/>
        <where>
            is_delete = 0
            <if test="menuNumber != null  and menuNumber != ''">and menu_number = #{menuNumber}</if>
            <if test="cuisineNumber != null  and cuisineNumber != ''">and cuisine_number = #{cuisineNumber}</if>
            <if test="customName != null  and customName != ''">and custom_name = #{customName}</if>
            <if test="jgid != null  and jgid != ''">and jgid = #{jgid}</if>
        </where>
    </select>
</mapper>
