package com.red.circle.wallet.inner.service.bank;

import com.red.circle.wallet.inner.model.cmd.UserBankApprovalMoneyApplyCmd;
import com.red.circle.wallet.inner.model.cmd.UserBankRunningWaterQryCmd;
import com.red.circle.wallet.inner.model.cmd.UserBankWithdrawGoldApplyQryCmd;
import com.red.circle.wallet.inner.model.cmd.UserBankWithdrawMoneyApplyQryCmd;
import com.red.circle.wallet.inner.model.dto.UserBankRunningWaterDTO;
import com.red.circle.wallet.inner.model.dto.UserBankWithdrawGoldApplyDTO;
import com.red.circle.wallet.inner.model.dto.UserBankWithdrawMoneyApplyDTO;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 银行卡流水.
 *
 * @author pengliang on 2023/10/13
 */
public interface UserBankRunningWaterClientService {

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

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

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

  /**
   * 批量插入流水.
   */
  void addBatch(List<UserBankRunningWaterDTO> runningWaters);

  /**
   * 分页查询流水
   */
  List<UserBankRunningWaterDTO> pageRunningWater(UserBankRunningWaterQryCmd query);

  /**
   * 计算流水金额.
   */
  String calculateTotal(UserBankRunningWaterQryCmd query);

  /**
   * 用户银行卡金币兑换申请.
   */
  List<UserBankWithdrawGoldApplyDTO> pageBankWithdrawGoldApply(
      UserBankWithdrawGoldApplyQryCmd query);

  /**
   * 用户银行卡提现申请记录.
   */
  List<UserBankWithdrawMoneyApplyDTO> listBankWithdrawMoneyApply(
      UserBankWithdrawMoneyApplyQryCmd query);

    /**
     * 用户银行卡提现申请记录.
     */
    Map<Long, UserBankWithdrawMoneyApplyDTO> mapByIds(Set<Long> ids);

  /**
   * 获得记录.
   */
  UserBankWithdrawMoneyApplyDTO getWithdrawMoneyApplyById(Long id);

  /**
   * 审核申请记录.
   */
  void approvalMoneyApply(UserBankApprovalMoneyApplyCmd apply);

  /**
   * 月用户工资流水.
   */
  List<UserBankRunningWaterDTO> getMonthSalaryRunningWater(List<Long> userIds, String event, String month);
}
