package com.qs.mp.user.service;

import com.qs.mp.admin.domain.Ticket;
import com.qs.mp.admin.domain.TicketAwardsPrize;
import com.qs.mp.admin.domain.vo.TicketAwardsPrizeVO;
import com.qs.mp.user.domain.UserHitPrize;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qs.mp.user.domain.param.TicketAutoCashPrizeParam;
import com.qs.mp.user.domain.vo.TicketHitPrizeBarrageVO;
import com.qs.mp.user.domain.vo.UserHitPrizeDetailVO;

import java.util.List;

/**
 * <p>
 * 用户中奖记录 服务类
 * </p>
 *
 * @author quanshu
 * @since 2022-03-07
 */
public interface IUserHitPrizeService extends IService<UserHitPrize> {

  /**
   * 查看盲票中奖奖品列表
   * @param ticket
   * @return
   */
  List<TicketAwardsPrize> listPrize(Ticket ticket, Long userId);

  /**
   * 兑奖
   * @param ticket
   * @return
   */
  void cashPrize(Ticket ticket, Long userId, String awardsId, String prizeId);

  /**
   * 获取除该用户外的近 20 条中奖弹幕
   * @param userId  用户 id
   * @return
   */
  List<TicketHitPrizeBarrageVO> hitPrizeBarrage(Long userId);

  /**
   * 获取用户当天中奖的 2 条弹幕
   * @param userId  用户 id
   * @return
   */
  List<TicketHitPrizeBarrageVO> hitPrizeBarrageByUserId(Long userId);

  /**
   * 获取除当前用户外，6 个月内 5 条大奖弹幕
   * @param userId  用户 id
   * @return
   */
  List<TicketHitPrizeBarrageVO> expensiveHitPrizeBarrage(Long userId);

  /**
   * 盲票自动开奖
   * @param ticket
   * @param userId
   * @param param
   */
  UserHitPrizeDetailVO autoCashPrize(Long userId, TicketAutoCashPrizeParam param);

}
