package com.diagbot.client.hystrix;

import com.diagbot.client.UserServiceClient;
import com.diagbot.dto.RespDTO;
import com.diagbot.entity.User;
import com.diagbot.dto.UserOrgDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;


/**
 * @Description: 调用用户服务
 * @author: gaodm
 * @time: 2018/8/6 9:52
 */
@Component
@Slf4j
public class UserServiceHystrix implements UserServiceClient {

    @Override
    public RespDTO<User> getUser(String token, String username) {
        System.out.println(token);
        System.out.println(username);
        return null;
    }

    @Override
    public RespDTO<Map<Long, UserOrgDTO>> getUserAndOrg(List<Long> userIds) {
        log.error("【hystrix】调用{}异常","getUserAndOrg");
        return null;
    }

    @Override
    public RespDTO<List<Long>> getUserByOrgName(String orgName) {
        log.error("【hystrix】调用{}异常","getUserByOrgName");
        return null;
    }
}
