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

    <!-- 分页获取灶类信息 -->
    <select id="selectAllList" resultType="com.bonus.canteen.core.menu.vo.MenuDishesCookPageVO">
        select
        cook_id cookId,
        cook_name cookName,
        crby,
        crtime,
        upby,
        uptime
        from
        menu_dishes_cook
        where
        del_flag = #{delFlag}
        <if test="dishesCookPageDTO.cookId != null">
            and cook_id = #{dishesCookPageDTO.cookId}
        </if>
        <if test="dishesCookPageDTO.cookName != null and dishesCookPageDTO.cookName != ''">
            and cook_name like concat(concat('%', #{dishesCookPageDTO.cookName}), '%')
        </if>
        order by
        id desc
    </select>
</mapper>
