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

    <select id="getByStepIds" resultType="com.bonus.canteen.core.menu.vo.MenuDishesStepDetailVo">
        select t1.* ,
        t2.content stepName,
        t3.step_no as stepNum
        from menu_dishes_step_detail t1
        left join menu_material_function t2 on t1.function_id = t2.function_id
        left join menu_dishes_step t3 on t1.step_id = t3.step_id
        where t1.step_id in
        <foreach collection="stepIds" item="stepId" separator="," open="(" close=")">
            #{stepId}
        </foreach>
    </select>
</mapper>
