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

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.wallet.inner.model.dto.FreightBalanceRunningWaterDTO;
import java.util.List;
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/12/26
 */
public interface FreightBalanceRunningWaterClientApi {

  String API_PREFIX = "/freight/balance/running/water/client";

  /**
   * 用户货运单.
   *
   * @param userId 用户id
   * @param lastId 最后一条记录id
   * @return ignore
   */
  @GetMapping("/flowByUserId")
  ResultResponse<List<FreightBalanceRunningWaterDTO>> flowByUserId(
      @RequestParam("userId") Long userId,
      @RequestParam(value = "type", required = true) Integer type,
      @RequestParam(value = "searchId", required = false) Long searchId,
      @RequestParam(value = "lastId",required = false) Long lastId
  );

  @GetMapping("/listByIds")
  ResultResponse<List<FreightBalanceRunningWaterDTO>> listByIds(@RequestParam("ids") Set<Long> ids);

    /**
   * 用户货运单.
   *
   * @param sellerId 用户id
   * @param lastId   最后一条记录id
   * @return ignore
   */
  @GetMapping("/flowBySellerId")
  ResultResponse<List<FreightBalanceRunningWaterDTO>> flowBySellerId(
      @RequestParam("sellerId") Long sellerId,
      @RequestParam(value = "lastId",required = false) Long lastId
  );

  /**
   * 用户货运单.
   *
   * @param userId      用户id
   * @param lastId      最后一条记录id
   * @param currentDate 年月
   * @return ignore
   */
  @GetMapping("/flowByUserIdAndDate")
  ResultResponse<List<FreightBalanceRunningWaterDTO>> flowByUserIdAndDate(
      @RequestParam("userId") Long userId,
      @RequestParam(value = "lastId", required = false) Long lastId,
      @RequestParam(value = "currentDate", required = false) String currentDate
  );

  /**
   * 添加.
   */
  @PostMapping("/save")
  void save(@RequestBody FreightBalanceRunningWaterDTO dto);



}
