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

import com.red.circle.common.business.dto.cmd.PageUserIdCmd;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.game.fruit.application.dto.clientobject.GameFruitAwardRecordCO;
import com.red.circle.game.fruit.application.dto.cmd.UserBetCmd;
import com.red.circle.game.fruit.infrastructure.database.entity.GameFruitUserDaysRanking;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 用户每日盈利排名 服务类.
 * </p>
 *
 * @author lisizhe on 2023-11-30 19:17
 */
public interface GameFruitUserDaysRankingService extends BaseService<GameFruitUserDaysRanking> {

  List<GameFruitUserDaysRanking> listTop10(Integer top, String origin);

  GameFruitUserDaysRanking getUserEarning(Long userId);

  void addDaysRankingBet(UserBetCmd cmd);

  void addDaysRankingEarning(List<GameFruitAwardRecordCO> gameFruitAwardRecords);

  List<GameFruitUserDaysRanking> listByUserIds(Set<Long> userIds, BigDecimal lossRatioLottery,
      BigDecimal toDayLossLottery);

  Long countWeekEarning(Long userId);

  Long countWeekPlayDays(Long userId);

  List<GameFruitUserDaysRanking> getTopLimit(Long quantity, String sysOrigin);

  PageResult<GameFruitUserDaysRanking> pageDaysUserData(PageUserIdCmd cmd);
}
