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

import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.wallet.inner.model.cmd.UserWithdrawInfoBackQryCmd;
import com.red.circle.wallet.inner.model.cmd.UserWithdrawInfoCmd;
import com.red.circle.wallet.inner.model.cmd.UserWithdrawInfoPassCmd;
import com.red.circle.wallet.inner.model.dto.UserWithdrawInfoDTO;
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 tf
 */
public interface UserWithdrawInfoClientApi {

  String API_PREFIX = "/user-withdraw-info/client";

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

  @GetMapping("/getById")
  ResultResponse<UserWithdrawInfoDTO> getById(@RequestParam("id") Long id);

  @GetMapping("/existWithdrawInfo")
  ResultResponse<Boolean> existWithdrawInfo(@RequestParam("userId") Long userId,
      @RequestParam("category") String category);

  @PostMapping("/addWithdrawInfo")
  ResultResponse<Void> addWithdrawInfo(@RequestBody UserWithdrawInfoCmd cmd);

  @PostMapping("/updateWithdrawInfo")
  ResultResponse<Void> updateWithdrawInfo(@RequestBody UserWithdrawInfoCmd param);

  @GetMapping("/listByUserId")
  ResultResponse<List<UserWithdrawInfoDTO>> listByUserId(@RequestParam("userId") Long userId);

  @GetMapping("/listPassByUserId")
  ResultResponse<List<UserWithdrawInfoDTO>> listPassByUserId(@RequestParam("userId") Long userId);

  @GetMapping("/useWithdrawInfo")
  ResultResponse<Void> useWithdrawInfo(@RequestParam("id") Long id,
      @RequestParam("userId") Long userId,
      @RequestParam("currentUidLong") Long currentUidLong);

  @GetMapping("/deleteByIdByUserId")
  ResultResponse<Void> deleteByIdByUserId(@RequestParam("id") Long id,
      @RequestParam("userId") Long userId,
      @RequestParam("currentUidLong") Long currentUidLong);

  @PostMapping("/pass")
  ResultResponse<Void> pass(@RequestBody UserWithdrawInfoPassCmd cmd);

  @PostMapping("/notPass")
  ResultResponse<Void> notPass(@RequestBody UserWithdrawInfoPassCmd cmd);

  @PostMapping("/pageQuery")
  ResultResponse<PageResult<UserWithdrawInfoDTO>> pageQuery(
      @RequestBody UserWithdrawInfoBackQryCmd dbQuery);

  @PostMapping("/removeBatchByUserId")
  ResultResponse<Void> removeBatchByUserId(@RequestBody List<Long> userIds);
}
