package org.security.trans.feign;

import org.security.common.constant.CommonConstant;
import org.security.system.user.entity.User;
import org.security.system.user.vo.UserVO;
import org.springblade.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;

/**
 * @author zj 2022/4/22
 */
@FeignClient(
	value = CommonConstant.APPLICATION_USER_NAME
)
public interface UserFeignClient {

	@GetMapping("/user/role")
	R<List<UserVO>> getListByRole(@RequestParam String roleId);

	@GetMapping("/user/detail")
	R<UserVO> getUserDetail(@RequestParam Long id);

	@GetMapping("/detail")
	R<UserVO> detail(User user);
}
