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

    <select id="listMaterialFunction" resultType="com.bonus.canteen.core.menu.vo.MaterialFunctionListVO">
        SELECT
            function_id,
            content
        FROM
            menu_material_function
        WHERE
            material_id = #{content.materialId}
            <if test="content.type != null">
                AND type = #{content.type}
            </if>
    </select>
</mapper>
