<?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.bonus.canteen.core.menu.mapper.MenuDishesTypeMapper">

    <!-- 分页获取菜品类型 -->
    <select id="selectAllList" resultType="com.bonus.canteen.core.menu.vo.MenuDishesTypePageVO">
        select
        type_id,
        type_name,
        alias_name,
        crby,
        crtime,
        upby,
        uptime
        from
        menu_dishes_type
        where
        del_flag = #{delFlag}
        <if test="dishesTypePageDTO.typeId != null">
            and type_id = #{dishesTypePageDTO.typeId}
        </if>
        <if test="dishesTypePageDTO.typeName != null and dishesTypePageDTO.typeName != ''">
            and type_name = #{dishesTypePageDTO.typeName}
        </if>
        order by
        id desc
    </select>
</mapper>
