package cn.iocoder.yudao.module.system.api.rental;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.system.api.rental.dto.RentalDepositRecordDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 租赁订单金额记录")
public interface RentalDepositRecordApi {

    String PREFIX = ApiConstants.PREFIX + "/rental-deposit";

    @PutMapping(PREFIX + "/create")
    @Operation(summary = "创建租赁订单出入张记录")
    CommonResult<Long> create(@RequestBody RentalDepositRecordDTO createReqVO);

    @GetMapping(PREFIX + "/getRecordAmount")
    @Operation(summary = "获取租赁订单已收取的金额")
    CommonResult<Map<String, BigDecimal>> getRecordAmount(@RequestParam("orderNo") String orderNo);
}
