package com.red.circle.wallet.infra.database.rds.service.diamond;

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.mybatis.service.BaseService;
import com.red.circle.wallet.infra.database.rds.entity.diamond.SalaryDiamondRunningWater;
import com.red.circle.wallet.inner.model.cmd.UserSalaryDiamondRunningWaterQryCmd;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户工资钻石流水记录 服务类.
 * </p>
 *
 * @author zongpubin on 2024-03-13 17:24
 */
public interface SalaryDiamondRunningWaterService extends BaseService<SalaryDiamondRunningWater> {

  /**
   * 获取用户最新的一个月流水.
   */
  List<SalaryDiamondRunningWater> listUserLatestOneMonths(Long userId, Integer type, Integer size,
                                                          Long lastId);

  PageResult<SalaryDiamondRunningWater> runningWaterPage(UserSalaryDiamondRunningWaterQryCmd query);

  List<SalaryDiamondRunningWater> getTeamIdRunWater(Long teamId, Integer billBelong);

  List<SalaryDiamondRunningWater> appPage(Long userId, Integer size, Long lastId);

  List<SalaryDiamondRunningWater> appPage(Long userId, Integer size, Long lastId, String waterEvent);

  /**
   * 是否存在跟踪id.
   */
  boolean existsTrackId(String trackId);

  /**
   * 是否存在跟踪id.
   */
  boolean existsTrackId(Long userId, String event, String trackId);

  Map<Integer, Long> getDiamondData(Long userId, Boolean isMonth);

  Map<Long, Long> getDiamondByUserIds(List<Long> userIds);
}
