package com.buy507.mall.dao;

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

import org.apache.ibatis.annotations.Param;

import com.buy507.mall.dto.MemberShoppingInfoResult;
import com.buy507.mall.dto.MemberTeamInfoResult;
import com.buy507.mall.dto.OrderChartResult;
import com.buy507.mall.dto.WithdrawChartResult;
import com.buy507.mall.model.OmsOrder;

public interface DmsQueryDao {
	
	/**
	 * 查询会员团队信息
	 */
	List<MemberTeamInfoResult> selectMemberTeamInfo(@Param("nickname") String nickname, @Param("inviterName") String inviterName,
			@Param("inviterId") Long inviterId,
			@Param("memberLevel") Integer memberLevel,
			@Param("storeStatus") Integer storeStatus);
	
	/**
	 * 查询今日订单
	 * @return
	 */
	List<OmsOrder> selectTodayOrder();
	
	/**
	 * 查询昨日销售总额
	 * @return
	 */
	BigDecimal selectYesterdaySellAmount();
	
	/**
	 * 查询本周销售总额
	 * @return
	 */
	Integer selectCurrentWeekOrderCount();
	
	/**
	 * 查询本周销售总额
	 * @return
	 */
	BigDecimal selectCurrentWeekSellAmount();
	
	/**
	 * 查询本月销售总额
	 * @return
	 */
	Integer selectCurrentMonthOrderCount();
	
	/**
	 * 查询本月销售总额
	 * @return
	 */
	BigDecimal selectCurrentMonthSellAmount();
	
	/**
	 * 查询本年销售总额
	 * @return
	 */
	Integer selectCurrentYearOrderCount();
	
	/**
	 * 查询本年销售总额
	 * @return
	 */
	BigDecimal selectCurrentYearSellAmount();
	
	/**
	 * 查询销售总金额
	 * @return
	 */
	BigDecimal selectAllSellAmount();
	
	/**
	 * 查询积分支付总金额
	 * @return
	 */
	BigDecimal selectBalancePayemntAmount();
	
	/**
	 * 查询订单图表数据
	 * @return
	 */
	List<OrderChartResult> selectOrderChart(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
	
	/**
	 * 查询提现图表数据
	 * @return
	 */
	List<WithdrawChartResult> selectWithdrawChart(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
	
	/**
	 * 查询本周提现总额
	 * @return
	 */
	Integer selectCurrentWeekWithdrawCount();
	
	/**
	 * 查询本周提现总额
	 * @return
	 */
	BigDecimal selectCurrentWeekWithdrawAmount();
	
	/**
	 * 查询本月提现总额
	 * @return
	 */
	Integer selectCurrentMonthWithdrawCount();
	
	/**
	 * 查询本月提现总额
	 * @return
	 */
	BigDecimal selectCurrentMonthWithdrawAmount();
	
	/**
	 * 查询本年提现总额
	 * @return
	 */
	Integer selectCurrentYearWithdrawCount();
	
	/**
	 * 查询本年提现总额
	 * @return
	 */
	BigDecimal selectCurrentYearWithdrawAmount();
	
	/**
	 * 查询会员购物信息
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	List<MemberShoppingInfoResult> selectMemberShoppingInfo(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
	
}
