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

import java.util.Collection;
import java.util.List;

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

/**
 * 菜品计划菜品关联Service接口
 *
 * @author xsheng
 * @date 2025-04-03
 */
public interface IMenuRecipeDishesService  extends IService<MenuRecipeDishes> {
    /**
     * 查询菜品计划菜品关联
     *
     * @param id 菜品计划菜品关联主键
     * @return 菜品计划菜品关联
     */
    public MenuRecipeDishes selectMenuRecipeDishesById(Long id);

    @Override
    boolean saveBatch(Collection<MenuRecipeDishes> entityList);


    /**
     * 查询菜品计划菜品关联列表
     *
     * @param menuRecipeDishes 菜品计划菜品关联
     * @return 菜品计划菜品关联集合
     */
    public List<MenuRecipeDishes> selectMenuRecipeDishesList(MenuRecipeDishes menuRecipeDishes);

    /**
     * 新增菜品计划菜品关联
     *
     * @param menuRecipeDishes 菜品计划菜品关联
     * @return 结果
     */
    public int insertMenuRecipeDishes(MenuRecipeDishes menuRecipeDishes);

    /**
     * 修改菜品计划菜品关联
     *
     * @param menuRecipeDishes 菜品计划菜品关联
     * @return 结果
     */
    public int updateMenuRecipeDishes(MenuRecipeDishes menuRecipeDishes);

    /**
     * 修改菜品计划菜品关联供应量
     *
     * @param menuRecipeDishes 菜品计划菜品关联
     * @return 结果
     */
    public int reduceMenuRecipeDishesSupplyNum(MenuRecipeDishes menuRecipeDishes, Integer quantity);

    public int addMenuRecipeDishesSupplyNum(MenuRecipeDishes menuRecipeDishes, Integer quantity);


    /**
     * 批量删除菜品计划菜品关联
     *
     * @param ids 需要删除的菜品计划菜品关联主键集合
     * @return 结果
     */
    public int deleteMenuRecipeDishesByIds(Long[] ids);

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

    Boolean deleteByDetailId(Long detailId);
}
