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

import java.time.LocalDate;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;

import com.bonus.canteen.core.menu.domain.MenuRecipe;
import com.bonus.canteen.core.menu.dto.MenuRecipeParamDTO;
import com.bonus.canteen.core.menu.dto.RecipeDishesCountDTO;
import com.bonus.canteen.core.menu.model.MenuBaseModel;
import com.bonus.canteen.core.menu.vo.MenuRecipeDataVO;
import com.bonus.canteen.core.menu.vo.MenuRecipeV2VO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

/**
 * 菜品计划信息Mapper接口
 * 
 * @author xsheng
 * @date 2025-04-03
 */
public interface MenuRecipeMapper {
    /**
     * 查询菜品计划信息
     * 
     * @param id 菜品计划信息主键
     * @return 菜品计划信息
     */
    public MenuRecipe selectMenuRecipeById(Long id);

    /**
     * 查询菜品计划信息列表
     * 
     * @param menuRecipe 菜品计划信息
     * @return 菜品计划信息集合
     */
    public List<MenuRecipe> selectMenuRecipeList(MenuRecipe menuRecipe);

    /**
     * 新增菜品计划信息
     * 
     * @param menuRecipe 菜品计划信息
     * @return 结果
     */
    public int insertMenuRecipe(MenuRecipe menuRecipe);

    /**
     * 修改菜品计划信息
     * 
     * @param menuRecipe 菜品计划信息
     * @return 结果
     */
    public int updateMenuRecipe(MenuRecipe menuRecipe);

    /**
     * 删除菜品计划信息
     * 
     * @param id 菜品计划信息主键
     * @return 结果
     */
    public int deleteMenuRecipeById(Long id);

    /**
     * 批量删除菜品计划信息
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMenuRecipeByIds(Long[] ids);

    /**
     * 获取菜品列表
     * @param dto
     * @return
     */
    List<MenuRecipeV2VO> getDishesList(MenuRecipeParamDTO dto);
    /**
     * 根据recipeIds获取菜品数量
     * @param recipeIds
     * @return
     */
    List<RecipeDishesCountDTO> getDishesCountByRecipeIds(@Param("recipeIds") List<Long> recipeIds);
    /**
     * 根据recipeIds获取日期
     * @param recipeIds
     * @return
     */
    List<MenuRecipeDataVO> selectApplyDateListByRecipeId(@Param("applyDate") LocalDate applyDate, @Param("recipeIds") List<Long> recipeIds);

    /**
     * 查询基础
     * @param baseDishesIdList
     * @return
     */
    List<MenuBaseModel> selectBaseSizeDishesId(@Param("baseDishesIdList") List<Long> baseDishesIdList);
}
