package com.red.circle.console.infra.database.mongo.count.service;

import com.red.circle.console.infra.database.mongo.count.dto.CurrencyAnalyze;
import com.red.circle.console.infra.database.mongo.count.dto.CurrencyAnalyzeItem;
import com.red.circle.console.infra.database.mongo.count.dto.CurrencyAnalyzeUser;
import com.red.circle.console.infra.database.mongo.count.dto.GoldRunningTypeCount;
import com.red.circle.console.infra.database.mongo.count.dto.query.GoldAnalyzeQuery;
import com.red.circle.console.infra.database.mongo.count.entity.UserGoldRunningWater;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author pengliang on 2022/7/21
 */
public interface UserGoldRunningWaterService {

  /**
   * 添加流水.
   */
  void add(UserGoldRunningWater runningWater);

  /**
   * 主节点,是否存在跟踪ID.
   */
  boolean existsPrimaryTrackId(String trackId);

  /**
   * 金币分析.
   */
  List<CurrencyAnalyzeItem> listGoldAnalyzeItem(GoldAnalyzeQuery query);

  /**
   * 金币分析.
   */
  CurrencyAnalyze getCurrencyAnalyze(GoldAnalyzeQuery query);

  /**
   * 统计每日流水.
   */
  List<GoldRunningTypeCount> countSysOriginGroupType(LocalDate start, LocalDate end);

  /**
   * 分析在指定时间段内，用户金币情况.
   */
  List<CurrencyAnalyzeUser> countCurrencyAnalyzeUser(String sysOrigin,
      LocalDateTime start,
      LocalDateTime end,
      List<String> notInOrigin,
      Integer limit);

  List<UserGoldRunningWater> list(Integer size);

  void remove(List<Long> ids);
}
