package com.jeeplus.hotelorder.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jeeplus.hotelorder.order.domain.HotelOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Map;

@Mapper
public interface HotelOrderMapper extends BaseMapper<HotelOrder> {

    /**
     * 订单看板统计
     */
    Map<String, Object> selectDashboard();

    /**
     * 统计今日有效订单数
     */
    int countTodayOrders();

    /**
     * 统计今日营业额
     */
    BigDecimal sumTodayRevenue(@Param("today") String today);

    /**
     * 查询指定房间今日订单数
     */
    int countTodayByRoomNo(@Param("roomNo") String roomNo);

    /**
     * 查询当天最大订单号
     */
    String selectMaxOrderNo(@Param("prefix") String prefix);
}
