package com.qs.mp.channel.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.qs.mp.channel.domain.Channel;
import com.qs.mp.channel.domain.ChannelCommission;

import com.qs.mp.channel.domain.vo.ChannelVO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @auther quanshu
 * @create 2022-03-02 12:22:24
 * @describe 渠道佣金记录mapper类
 */
public interface ChannelCommissionMapper extends BaseMapper<ChannelCommission> {

	/**
	 * 查询子渠道一定时间范围内的佣金金额 -
	 * @param channelNo
	 * @param days
	 * @return
	 */
	public int getChannelCommAmtCnt(@Param("channelNo") String channelNo,@Param("days") int days);


	/**
	 * 查询子渠道一定时间范围内的销售金额
	 * @param channelNo
	 * @param days
	 * @return
	 */
	public int getChannelSaleAmtCnt(@Param("channelNo") String channelNo,@Param("days") int days);


	/**
	 * 查询子渠道全部佣金金额 -
	 * @param channelNo
	 * @param days
	 * @return
	 */
	public int getChannelTotalCommAmtCnt(@Param("channelNo") String channelNo);


	/**
	 * 查询子渠道全部的销售金额
	 * @param channelNo
	 * @return
	 */
	public int getChannelTotalSaleAmtCnt(@Param("channelNo") String channelNo);

	/**
	 * 查询渠道ID列表
	 * @param wrapper
	 * @return
	 */
	List<ChannelCommission> getChannelList(@Param(Constants.WRAPPER) Wrapper<ChannelCommission> wrapper);

}
