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

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bonus.canteen.core.allocation.canteen.dto.AllocCanteenModifyDTO;
import com.bonus.canteen.core.allocation.canteen.dto.MarketCanteenSaveDTO;
import com.bonus.canteen.core.allocation.canteen.dto.ModifyCanteenIfReserveDTO;
import com.bonus.canteen.core.allocation.canteen.model.AllocCanteen;
import com.bonus.canteen.core.allocation.canteen.param.AllocAreaParam;
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenStallPageParam;
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenStallParam;
import com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenAuthVO;
import com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenStallVO;
import com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenVO;
import com.bonus.canteen.core.menu.vo.AppletReserveCanteenVO;

import java.util.List;

public interface AllocCanteenService extends IService<AllocCanteen> {
   List<Integer> listAvailPayTypeForApp(Long canteenId);

   List<Long> getCanteenIdListByAreaIdList(List<Long> areaIdList);

   List<AllocCanteenStallVO> listAllCanteenStall();

   void checkAndDelReserveCanteen(List<AppletReserveCanteenVO> reserveCanteenList);

   AllocCanteen getAllocCanteenCache(Long canteenId);

   List<Tree<Long>> getTenantGroupCanteenTree(AllocAreaParam param);

   Page<AllocCanteenVO> pageCanteen(AllocCanteenStallPageParam param);

   void checkCanteenNameExist(String canteenName, Long canteenId);

   void saveCanteen(AllocCanteen allocCanteen);

   void correctCanteenNum();

   void modifyByCanteenId(AllocCanteenModifyDTO canteenModifyDTO, Long canteenId);

   void deleteCanteen(Long canteenId);

   void modifyCanteenIfReserve(ModifyCanteenIfReserveDTO reserveDTO);

   void modifyBusinessState(Long canteenId, Integer businessState);

   Integer checkCanteenRest(Long canteenId);

   AllocCanteen checkCanteenIdExist(Long canteenId);

   String getLatestCanteenNum(Long superId);

   boolean checkCanteenIfReserve(Long canteenId, Long stallId);

   List<AllocCanteenAuthVO> listAllAuthCanteen(AllocCanteenStallParam param);

   Long saveMarketCanteen(MarketCanteenSaveDTO marketSaveDTO);
}
