package com.yuchen.saas.manage.user.api.feign;

import com.yuchen.saas.manage.user.api.entity.User;
import com.yuchen.saas.manage.user.api.request.UserInfoRequest;
import com.yuchen.saas.manage.user.api.response.UserInfoResponse;
import com.yuchen.saas.manage.user.api.vo.UserVO;
import io.swagger.annotations.ApiOperation;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.mp.support.Condition;
import org.nest.springwrap.core.tool.api.R;
import org.nest.springwrap.core.tool.constant.RoleConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author: 肖润飞
 * @CreateTime: 2022/11/25 14:01
 * @Description: TODO
 * @Version: 1.0
 */
@FeignClient(
        value = AppNameConstant.SAAS_USER,
        fallbackFactory = UserFeignFallback.class
)
public interface UserFeignServer {

    @GetMapping("/account/accountInfo")
    R accountInfo(@RequestParam String account);

    @GetMapping("/user/findPatrolUser")
    R<List<UserInfoResponse>> findPatrolUser(@SpringQueryMap UserInfoRequest userInfoRequest);

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