package com.xxfc.platform.order.mapper;

import com.xxfc.platform.order.entity.OrderAccount;
import com.xxfc.platform.order.pojo.QueryCriteria;
import com.xxfc.platform.order.pojo.ReturnOrderAmount;
import com.xxfc.platform.order.pojo.Term;
import com.xxfc.platform.order.pojo.account.OrderAccountBo;
import com.xxfc.platform.order.pojo.account.OrderAccountDTO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;


/**
 * 订单帐目
 *
 * @author zhoujw
 * @email 18178966185@163.com
 * @date 2019-09-09 15:51:16
 */
public interface OrderAccountMapper extends Mapper<OrderAccount> {

    List<OrderAccountDTO> getOrderAccountByOrderType(Term term);

    List<OrderAccountBo> selectOrderAccountByOrderTypeAndStartTimeAndEndTime(@Param("orderType") Integer orderType,
                                                                             @Param("startTime") long startTime,
                                                                             @Param("endTime") long endTime);

    List<OrderAccountBo> selectByDateAndStatffIds(@Param("startDate") Date startDate,
                                                  @Param("endDate") Date endDate,
                                                  @Param("staffUserIds") List<Integer> staffUserIds);

    List<ReturnOrderAmount> outStatisticalData(@Param("queryCriteria")QueryCriteria queryCriteria, @Param("startTime") Long startTime, @Param("endTime")Long endTime);
}
