package com.red.circle.other.infra.database.rds.service.activity;

import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.other.infra.database.rds.entity.activity.LotteryDeviceRecord;

/**
 * 抽奖设备记录 Service
 *
 * @author system
 * @since 2025-12-30
 */
public interface LotteryDeviceRecordService extends BaseService<LotteryDeviceRecord> {

  /**
   * 根据活动ID和设备指纹查询记录
   *
   * @param activityId 活动ID
   * @param fingerprint 设备指纹
   * @return 设备记录
   */
  LotteryDeviceRecord getByActivityAndFingerprint(Long activityId, String fingerprint);

  /**
   * 记录设备信息（幂等操作）
   *
   * @param activityId 活动ID
   * @param userId 用户ID
   * @param fingerprint 设备指纹
   */
  void recordDevice(Long activityId, Long userId, String fingerprint);
}
