package com.springboot.cloud.auth.authentication.provider;

import com.springboot.cloud.auth.authentication.entity.License;
import com.springboot.cloud.auth.authentication.entity.Popedom;
import com.springboot.cloud.common.core.entity.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "organization", fallback = PopedomProviderFallback.class, path = "organization")
//@FeignClient(name = "organization", fallback = PopedomProviderFallback.class)
public interface PopedomProvider {

    @GetMapping(value = "/company/getAllPopedom")
    Result<List<Popedom>> popedoms();

    @GetMapping(value = "/company/getPopedom")
    Result<List<Popedom>> popedoms(@RequestParam("companyId") String companyId,@RequestParam("username")String username);

    @GetMapping(value = "/company/license")
    Result<License> license(@RequestParam("companyId")String companyId,@RequestParam("applicationCode")String applicationCode);
}
