package com.hai.service;

import com.hai.entity.HighDiscountAgentRel;
import com.hai.entity.HighDiscountUserRel;

import java.util.List;
import java.util.Map;

/**
 * @Auther: 胡锐
 * @Description:
 * @Date: 2021/4/4 15:10
 */
public interface HighDiscountUserRelService {

    /**
     * @Author 胡锐
     * @Description 领取优惠券code
     * @Date 2021/4/4 15:12
     **/
    void receiveDiscount(Long userId,Long codeId);

    /**
     * @Author 胡锐
     * @Description 领取优惠券
     * @Date 2021/4/4 15:12
     **/
    void receive(Long userId, Long discountAgentId);

    /**
     * @Author 胡锐
     * @Description 修改
     * @Date 2021/4/4 18:41
     **/
    void updateDiscountUserRel(HighDiscountUserRel highDiscountUserRel);

    /**
     * @Author 胡锐
     * @Description 根据用户id和优惠券id查询
     * @Date 2021/4/4 15:45 
     **/
    HighDiscountUserRel getRelByUserDiscount(Long userId,Long discountId);

    /**
     * @Author 袁野
     * @Description 优惠券id查询
     * @Date 2021/4/4 15:45
     **/
    HighDiscountUserRel getRelByDiscount(Long discountId);

    /**
     * @Author 胡锐
     * @Description 根据id查询
     * @Date 2021/4/4 18:02
     **/
    HighDiscountUserRel getRelById(Long id);

    /**
     * @Author 胡锐
     * @Description 查询优惠券列表
     * @Date 2021/4/4 15:35
     **/
    List<HighDiscountUserRel> getDiscountList(Map<String, Object> map);

    /**
     * @Author 胡锐
     * @Description 查询过期优惠券
     * @Date 2021/4/4 22:48
     **/
    List<HighDiscountUserRel> getExpiredDiscount();

    /**
     * 领取优惠券统计
     * @param userId
     * @param discountId
     * @return
     */
    Integer receiveDiscountCount(Long userId,Long discountId);

}
