package com.nantian.cloud.jljc.service.impl;

import com.nantian.cloud.jljc.service.FeignUpmsService;
import com.nantian.sc.cloud.admin.api.dto.DeptTree;
import com.nantian.sc.cloud.admin.api.entity.SysDept;
import com.nantian.sc.cloud.admin.api.entity.SysDeptRelation;
import com.nantian.sc.cloud.common.core.constant.ServiceNameConstants;
import com.nantian.sc.cloud.common.core.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * 远程调用sc-upms-biz服务失败的回调函数
 * @date 2020-11-17
 */
@Slf4j
@Component
public class FeignUpmsFallBackServiceImpl implements FeignUpmsService {

    @Override
    public R<List<SysDeptRelation>> getDescendantList(Integer deptId) {
        log.error("getDescendantList方法执行出错，远程调用sc-upms-biz服务失败");
        return R.failed();
    }

    @Override
    public R<List<DeptTree>> getTreeBySelect() {
        log.error("getTreeBySelect方法执行出错，远程调用sc-upms-biz服务失败");
        return R.failed();
    }

    @Override
    public R<List<SysDept>> getList() {
        log.error("getList方法执行出错，远程调用sc-upms-biz服务失败");
        return R.failed();
    }
}
