package com.xhpc.common.api;

import com.xhpc.common.api.factory.CardHistoryOrderFactory;
import com.xhpc.common.core.constant.ServiceNameConstants;
import com.xhpc.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author yuyang
 * @date 2022/1/24 17:50
 */
@FeignClient(contextId ="cardHistoryOrderService",value = ServiceNameConstants.XHPC_ORDER, fallbackFactory = CardHistoryOrderFactory.class)
public interface CardHistoryOrderService {

    /**
     * 卡启动前判断
     * @param userId           用户id
     * @param serialNumber     桩号
     * @param userType         用户类型
     * @param tenantId         租户
     * @param type             0 平台  1运营商
     * @param grantOperator    运营商站点编号6位
     * @return
     */
    @GetMapping("/api/chargeOrder/cardStartup")
    R cardStartup(@RequestParam(value = "userId") Long userId, @RequestParam(value = "serialNumber") String serialNumber, @RequestParam(value = "userType") Integer userType, @RequestParam(value = "tenantId") String tenantId, @RequestParam(value = "type") Integer type, @RequestParam(value = "grantOperator") String grantOperator, @RequestParam(value = "rateModelId") String rateModelId);
}
