package com.bonus.canteen.core.menu.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.menu.entity.MenuPackageDishes;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MenuPackageDishesMapper extends BaseMapper<MenuPackageDishes> {
//   int insertBatch(@Param("packageDishesList") List<MenuPackageDishes> packageDishesList);
//
//   @Select({"select 1 from menu_package_dishes ${ew.customSqlSegment}"})
//   Integer selectExistByWrapper(@Param("ew") Wrapper<MenuPackageDishes> wrapper);

   @Select({"select md.dishes_name from menu_package_dishes mpd left join menu_dishes md on mpd.dishes_id = md.dishes_id where mpd.del_flag = 2 and mpd.package_id = #{dishesId}"})
   List<String> selectDishesName(@Param("dishesId") Long dishesId);

//   List<MenuAppPackageDishesPageVO> selectPackageDishes(@Param("dishesId") Long dishesId);
}
