package com.ruoyi.mall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.mall.domain.order.Order;
import com.ruoyi.mall.domain.vo.AppOrderVO;
import com.ruoyi.mall.domain.vo.CountOrderVO;
import org.apache.ibatis.annotations.Param;
import org.checkerframework.checker.units.qual.A;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单表Mapper接口
 *
 * @author zcc
 */
public interface OrderMapper extends BaseMapper<Order> {
    /**
     * 查询订单表列表
     *
     * @param order 订单表
     * @return 订单表集合
     */
    List<Order> selectByEntity(Order order);


    List<AppOrderVO> orderPage(@Param("status") Integer status, @Param("memberId")Long memberId);

    AppOrderVO selectOrderDetail(Long orderId);

    CountOrderVO countByStatusAndMemberId(Long memberId);

    Integer cancelBatch(@Param("list") List<Order> orderList);



    Integer statWaitDelivered();

    int statDealMember(@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
}
