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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.canteen.core.kitchen.entity.dto.PassengerFlowByTimeDTO;
import com.bonus.canteen.core.kitchen.entity.vo.DeviceQueryPresentNumVo;
import com.bonus.canteen.core.kitchen.entity.vo.PassengerFlowByCanteenIdVO;
import com.bonus.canteen.core.kitchen.entity.vo.PassengerFlowVO;
import com.bonus.canteen.core.kitchen.model.DevicePassengerFlow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDate;
import java.util.List;

@Mapper
public interface DevicePassengerFlowMapper extends BaseMapper<DevicePassengerFlow> {
   List<PassengerFlowByTimeDTO> queryPassengerFlowByTime(@Param("date") LocalDate date, @Param("num") Integer num, @Param("canteenId") Long canteenId);

   PassengerFlowVO queryPresentCount(@Param("date") LocalDate date, @Param("canteenId") Long canteenId);

   PassengerFlowByCanteenIdVO queryPresentByMachineSnAndCanteenId(@Param("date") LocalDate date, @Param("canteenId") Long canteenId, @Param("deviceSn") String deviceSn);

   List<DeviceQueryPresentNumVo> queryPresentNumByCanteenId(@Param("date") LocalDate dateTime);

   DevicePassengerFlow queryFlowByDeviceSn(@Param("param") String deviceSn, @Param("date") LocalDate dateTime);
}
