package com.jeesharp.business.modules.food.service;

import com.jeesharp.business.modules.food.entity.FoodMealMenuItem;
import com.jeesharp.business.modules.food.entity.FoodMealOrderItem;
import com.jeesharp.business.modules.food.vo.FoodMealMenuItemQueryVO;
import com.jeesharp.framework.mybatis.core.service.BaseInterface;

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

public interface FoodMealMenuItemService extends BaseInterface<FoodMealMenuItem, FoodMealMenuItemQueryVO> {

    List<FoodMealMenuItem> listByMenuId(String menuId);

    List<FoodMealMenuItem> listByMenuIdAndIds(String menuId, Collection<String> ids, boolean forUpdate);

    int increaseSoldQuantity(String id, Integer quantity, String tenantCode);

    int decreaseSoldQuantity(String id, Integer quantity, String tenantCode);

    void increaseSoldQuantity(Map<String, Integer> quantityMap, String tenantCode);

    void releaseSoldQuantity(Collection<FoodMealOrderItem> items, String tenantCode);

    void updatePublishStatus(String id, String publishStatus);

    void deleteByMenuId(String menuId);
}
