package com.iformall.mapper;

import java.util.*;
import com.iformall.common.CommonMapper;
import com.iformall.domain.dto.MarkingCouponDataReportDto;
import com.iformall.domain.vo.MarkingSceneDataReportTVo;
import com.iformall.domain.vo.MarkingSceneDataReportVo;
import com.iformall.domain.vo.MarkingSceneDataVo;
import com.iformall.domain.vo.WxCouponActionLogVo;
import org.apache.ibatis.annotations.Param;
import com.iformall.domain.po.WxCouponActionLog;

public interface WxCouponActionLogMapper extends CommonMapper<WxCouponActionLog, String> {

	List<WxCouponActionLog> findList(WxCouponActionLog wxCouponActionLog);

	List<MarkingSceneDataReportVo> sceneDataMap(HashMap<String,Object> params);   // will be deleted

    void updateCreateTimeMd(HashMap<String,Object> params);

    List<MarkingSceneDataReportTVo> getSceneDataMap(HashMap<String,Object> params);

	List<MarkingSceneDataReportVo> sceneDataMapJoinCouponOrder(HashMap<String,Object> params);

	List<MarkingSceneDataVo> sceneDataList(MarkingCouponDataReportDto markingCouponDataReportDto);

	List<MarkingSceneDataReportVo> sceneDataJoinCouponOrderList(HashMap<String,Object> params);

	/**
	 * 查询场景投放发券数
	 * @param tenantId
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	int getCountByDateLimit(@Param("tenantId")String tenantId,@Param("startTime") Date startTime,@Param("endTime")Date endTime);


	int getCountByChannelId(@Param("tenantId")String tenantId,@Param("channelType") int channelType,@Param("channelId")Long channelId);

	/**
	 * 每人每天最多可接收多少张券
	 * @param params
	 * @return
	 */
	int getCountByUser(Map<String,Object> params);

	/**
	 * 每人多少天不会重复收到一张券
	 * @param params
	 * @return
	 */
	int getCountByUserAndCoupon(Map<String,Object> params);


	int getCountByUserAndCouponAndDate(Map<String,Object> params);

	/**
	 * 查找注券记录
	 * @param params
	 * @return
	 */
	List<WxCouponActionLogVo> getActionLog(Map<String,Object> params) ;
}
