package com.red.circle.game.fruit.infrastructure.database.repository;


import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.game.fruit.infrastructure.database.entity.GameFruitUserOpenedAward;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户已开的宝箱奖励 服务类.
 * </p>
 *
 * @author zongpubin on 2023-12-12 14:19
 */
public interface GameFruitUserOpenedAwardService extends BaseService<GameFruitUserOpenedAward> {

  /**
   * 获取当天用户已开宝箱
   */
  Map<Long, GameFruitUserOpenedAward> getByUserIdAndDate(Long userId, Integer date);

  /**
   * 获取当天用户是否已开宝箱
   */
  GameFruitUserOpenedAward checkOpenBox(Long userId, Long ruleId);

  /**
   * 当天用户是否已开宝箱
   */
  void deleteByUserId(Long userId, String boxType);

  /**
   * 获取当天用户已开宝箱列表
   */
  List<GameFruitUserOpenedAward> getByUserId(Long userId, String boxType);

}
