package com.red.circle.game.fruit.core.domain.gateway;

import com.red.circle.common.business.dto.cmd.PageUserIdCmd;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.game.fruit.application.dto.clientobject.GameFruitUserBetRecordCO;
import com.red.circle.game.fruit.infrastructure.database.entity.GameFruitUserBetRecord;
import com.red.circle.game.fruit.infrastructure.database.entity.GameFruitUserDaysRanking;
import com.red.circle.game.fruit.inner.model.cmd.GameDataStatisticalCmd;
import com.red.circle.game.fruit.inner.model.dto.GameDataStatisticalDTO;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 用户每轮下注情况 仓库.
 * </p>
 *
 * @author lisizhe on 2023-11-30 19:18
 */
public interface GameFruitUserBetGateway {

  BigDecimal getUserEarnings(Long userId, Long gameId);

  BigDecimal sumInvest(Long userId, Long gameId);

  List<GameFruitUserBetRecordCO> listUserBetByGameId(Long gameId, String sysOrigin);

  void addBetAmount(List<GameFruitUserBetRecord> list);

  void updateOrAddBetAmount(GameFruitUserBetRecord gameFruitUserBetRecord);

  List<GameFruitUserBetRecord> listLotteryInfo(Long gameId, Set<Long> prizeIds);

  List<GameFruitUserBetRecord> listLotteryUsers(Long gameId, Set<Long> userIds);

  List<GameFruitUserBetRecord> listLotteryUser(Long gameId, Long userId);

  GameFruitUserBetRecord getLotteryInfo(Long prizeId, Long gameId, Long userId);

  void updateWinnerStatus(Long gameId, Set<Long> winnerIds, Set<Long> prizeIds);

  Map<Long, List<GameFruitUserBetRecord>> gameFruitWinnerMapList(Long gameId, String sysOrigin);

  GameDataStatisticalDTO pageUserBetRecord(GameDataStatisticalCmd cmd);

  Map<Long, List<GameFruitUserBetRecord>> gameFruitTransportMapList(Long gameId, Set<Long> userIds);

  PageResult<GameFruitUserDaysRanking> pageDaysUserData(PageUserIdCmd cmd);
}
