package com.zhangmeng.oauth.feign;

import com.zhangmeng.model.dto.SysConstant;
import com.zhangmeng.model.entity.Permission;
import com.zhangmeng.model.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(SysConstant.mystyle_cloud_admin_manager)
public interface AdminFeign {

    @RequestMapping("/user/findByUserName")
    public User findByUserName(@RequestParam(value = "username", defaultValue = "forezp",required = false) String username);

    @RequestMapping("/permission/findByUserId")
    List<Permission> findByUserId(@RequestParam(value = "id", defaultValue = "forezp",required = false)Long id);
}
