package com.ylx.massage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ylx.massage.domain.vo.HomeBlock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.ylx.massage.domain.TOrder;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author YJR
 * @since 2023-11-24
 */
@Mapper
public interface TOrderMapper extends BaseMapper<TOrder> {

    public Page<TOrder> getAll(Page<TOrder>page, @Param("param") TOrder param);

    Integer getOrderNum(@Param("jsid") String jsid, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    Integer getAddNum(@Param("jsid") String jsid, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    Integer getUpgradeNum(@Param("jsid") String jsid, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    BigDecimal getTurnover(@Param("jsid") String jsid, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<HomeBlock> getBlock(@Param("start") Date start, @Param("end") Date end, @Param("deptId") String deptId);
}
