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

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

import com.baomidou.mybatisplus.extension.service.IService;
import com.bonus.canteen.core.menu.domain.MenuRecipeDetail;

/**
 * 菜品计划详情信息Service接口
 *
 * @author xsheng
 * @date 2025-04-03
 */
public interface IMenuRecipeDetailService extends IService<MenuRecipeDetail> {
    /**
     * 查询菜品计划详情信息
     *
     * @param id 菜品计划详情信息主键
     * @return 菜品计划详情信息
     */
    public MenuRecipeDetail selectMenuRecipeDetailById(Long id);

    /**
     * 查询菜品计划详情信息列表
     *
     * @param menuRecipeDetail 菜品计划详情信息
     * @return 菜品计划详情信息集合
     */
    public List<MenuRecipeDetail> selectMenuRecipeDetailList(MenuRecipeDetail menuRecipeDetail);

    /**
     * 新增菜品计划详情信息
     *
     * @param menuRecipeDetail 菜品计划详情信息
     * @return 结果
     */
    public int insertMenuRecipeDetail(MenuRecipeDetail menuRecipeDetail);

    /**
     * 修改菜品计划详情信息
     *
     * @param menuRecipeDetail 菜品计划详情信息
     * @return 结果
     */
    public int updateMenuRecipeDetail(MenuRecipeDetail menuRecipeDetail);

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

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



    List<MenuRecipeDetail> getByRecipeIdAndDatesAndIntervalId(Long recipeId, Set<LocalDate> dates, Integer mealtimeType);

    MenuRecipeDetail getByRecipeIdAndApplyDateAndIntervalId(Long recipeId, LocalDate applyDate, Integer mealtimeType);

    Map<Long, Set<LocalDate>> selectApplyDateListByRecipeId(List<Long> recipeIds);
}
