package com.yuchen.saas.payment.api.feign;

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.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(
        value = AppNameConstant.SAAS_PAYMENT,
        fallbackFactory = OrderStatisticFeignServiceFallBack.class
)
public interface OrderStatisticFeignService {
    @GetMapping("orderStatistic/getParkingPaySum")
    R<Integer> getParkingPaySum(@RequestParam Long parkingId, @RequestParam Integer orderType, @RequestParam String beginTime, @RequestParam String endTime);

    @GetMapping("orderStatistic/getDeptPaySum")
    R<Integer> getDeptPaySum(@RequestParam List<Long> parkingIds, @RequestParam Integer orderType, @RequestParam(required = false) String beginTime, @RequestParam(required = false) String endTime);

    @GetMapping("orderStatistic/getParkingPayTrendList")
    R<List<Map<String, Object>>> getParkingPayTrendList(@RequestParam Long parkingId, @RequestParam Integer orderType, @RequestParam Integer statistType, @RequestParam String beginTime, @RequestParam String endTime);

    @GetMapping("orderStatistic/getDeptPayTrendList")
    R<List<Map<String, Object>>> getDeptPayTrendList(@RequestParam List<Long> parkingIds, @RequestParam Integer orderType, @RequestParam Integer statistType, @RequestParam String beginTime, @RequestParam String endTime);
}