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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.allocation.alloc.model.AllocMetadata;
import com.bonus.canteen.core.allocation.canteen.model.AllocStall;
import com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenStallVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Set;

@Mapper
public interface AllocStallMapper extends BaseMapper<AllocStall> {
    @Select({"SELECT stall_id, stall_name FROM alloc_stall WHERE if_del = 2 AND canteen_id = #{canteenId}"})
    List<AllocCanteenStallVO.StallVO> listAllCanteenStall(@Param("canteenId") Long canteenId);

    String getStallNameByIdSet(@Param("stallIdSet") Set<Long> stallIdSet);

    List<AllocMetadata> queryAvailableOrder(@Param("modelType") String modelType,@Param("canteenId") Long canteenId, @Param("stallId") Long stallId);
}
