package com.yuchen.saas.parking.charge.api.feign;

import com.yuchen.saas.parking.charge.api.entity.charge.SpcChargeBill;
import com.yuchen.saas.parking.charge.api.vo.charge.*;
import io.swagger.annotations.ApiOperation;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(
        value = AppNameConstant.SAAS_PARKING_CHARGE,
        fallbackFactory = SpcChargeBillFeignFallback.class
)
public interface SpcChargeBillFeignClient {

    /**
     * 根据钱包id获取个人钱包信息
     * @return 钱包信息
     */
    @GetMapping("/spcUserChargeBill/getChargeBill")
    R<SpcChargeBillVO> getChargeBillById( @RequestParam Long billId);

    /**
     * 根据账单id获取PC端订单详情
     * @return PC端订单详情
     */
    @GetMapping("/spcAdminChargeBill/getChargeBill")
    R<SpcAdminChargeBillVO> getChargeBill(@RequestParam Long billId);

    /**
     *  获取小程序充电中的充电状态详情
     * @return 充电状态详情
     */
    @GetMapping("/spcUserChargeBill/getChargingBillV2/{billId}")
    R<ChargeTmlChargingCashVO> getChargingBill(@PathVariable Long billId);
    /**
     * 更新支付单发票状态
     *
     * @param ids             支付单ID
     * @param invoicingStatus 发票状态
     * @return
     */
    @GetMapping("/spcUserChargeBill/updateInvoicingStatus")
    Boolean updateInvoicingStatus(@RequestParam String ids, @RequestParam String payUserId, @RequestParam int invoicingStatus);

    /**
     * 根据车牌获取账单id
     * @param plateNo
     * @return
     */
    @GetMapping("/spcAdminChargeBill/getChargeBillDataByPlateNo/{plateNo}")
    R<List<SpcChargeBill>> getChargeBillDataByPlateNo(@PathVariable String plateNo);

    /**
     * 根据账单id获取充电账单列表
     * @param billIdList
     * @return
     */
    @GetMapping("/spcAdminChargeBill/getChargeBillDataList")
    R<List<SpcAdminChargeBillVO>> getChargeBillDataList(@RequestParam List<Long> billIdList);

    @PostMapping("/spcAdminChargeBill/exportChargeOrderData")
    @ApiOperation(value = "充电订单导出excel", notes = "充电订单导出excel")
     R<List<SpcChargeBillFinacalExcelVo>> exportChargeOrderData(@RequestBody List<Long> billIdList);
}
