package com.red.circle.wallet.inner.endpoint.bank.api;

import com.red.circle.framework.dto.ResultResponse;
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;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

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

  String API_PREFIX = "/user-bank-running-water/client";

  /**
   * 是否存在跟踪id.
   */
  @GetMapping("/existsTrackId")
  ResultResponse<Boolean> existsTrackId(@RequestParam("trackId") String trackId);

  /**
   * 是否存在跟踪id.
   */
  @GetMapping("/userTypeExistsTrackId")
  ResultResponse<Boolean> existsTrackId(
      @RequestParam("userId") Long userId,
      @RequestParam("event") String event,
      @RequestParam("trackId") String trackId);

  /**
   * 添加流水.
   */
  @PostMapping("/add")
  ResultResponse<Void> add(@RequestBody UserBankRunningWaterDTO runningWater);

  /**
   * 批量插入流水.
   */
  @PostMapping("/addBatch")
  ResultResponse<Void> addBatch(@RequestBody List<UserBankRunningWaterDTO> runningWaters);

  @PostMapping("/pageRunningWater")
  ResultResponse<List<UserBankRunningWaterDTO>> pageRunningWater(
      @RequestBody UserBankRunningWaterQryCmd query);

  @PostMapping("/calculateTotal")
  ResultResponse<String> calculateTotal(@RequestBody UserBankRunningWaterQryCmd query);

  @PostMapping("/pageBankWithdrawGoldApply")
  ResultResponse<List<UserBankWithdrawGoldApplyDTO>> pageBankWithdrawGoldApply(
      @RequestBody UserBankWithdrawGoldApplyQryCmd query);

  @PostMapping("/listBankWithdrawMoneyApply")
  ResultResponse<List<UserBankWithdrawMoneyApplyDTO>> listBankWithdrawMoneyApply(
      @RequestBody UserBankWithdrawMoneyApplyQryCmd query);

    @PostMapping("/mapByIds")
    ResultResponse<Map<Long, UserBankWithdrawMoneyApplyDTO>> mapByIds(@RequestBody Set<Long> ids);


    @GetMapping("/getWithdrawMoneyApplyById")
  ResultResponse<UserBankWithdrawMoneyApplyDTO> getWithdrawMoneyApplyById(@RequestParam("id") Long id);

  @PostMapping("/approvalMoneyApply")
  ResultResponse<Void> approvalMoneyApply(@RequestBody UserBankApprovalMoneyApplyCmd apply);

  /**
   * 月用户工资流水
   */
  @PostMapping("/getMonthSalaryRunningWater")
  ResultResponse<List<UserBankRunningWaterDTO>> getMonthSalaryRunningWater(
      @RequestParam("userIds") List<Long> userIds,
      @RequestParam("event") String event,
      @RequestParam("month") String month);

}
