package com.red.circle.other.infra.database.rds.dao.game;

import com.red.circle.framework.mybatis.dao.BaseDAO;
import com.red.circle.other.infra.database.rds.entity.game.GameRoomPkIntegralRecord;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 房间PK用户贡献记录 Mapper 接口.
 * </p>
 *
 * @author pengshigang
 * @since 2021-09-24
 */
public interface GameRoomPkIntegralRecordDAO extends BaseDAO<GameRoomPkIntegralRecord> {

  /**
   * 根据pk id获得总积分
   */
  Long getTotalIntegralByPkId(@Param("pkId") Long pkId);

  /**
   * 根据pk id获得对战人员总积分
   */
  List<GameRoomPkIntegralRecord> getTotalIntegralAndUserIdByPkId(@Param("pkId") Long pkId);

  /**
   * 根据pkId查询粉丝贡献数据并保存值粉丝贡献表
   */
  void saveIntegralToFansByPkId(@Param("pkId") Long pkId);

}
