package com.springboot.auth.authorization.provider;

import com.springboot.auth.authorization.entity.Company;
import com.springboot.auth.authorization.entity.User;
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 = OrganizationProviderFallback.class,path = "organization")
//@FeignClient(name = "organization", fallback = OrganizationProviderFallback.class)
public interface OrganizationProvider {

    @GetMapping(value = "/user/getUserByUsernameOrMobile")
    Result<User> getUserByUsernameOrMobile(@RequestParam("payload")String payload);

    @GetMapping(value = "/company/getUserAllCompany")
    Result<List<Company>> getUserAllCompany(@RequestParam("userId")String userId);
}
