package com.elink.esua.epdc.modules.analysis.service.impl.fallback;

import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.issue.form.HotIssueFormDTO;
import com.elink.esua.epdc.dto.issue.form.IssueStatisticsInfoFormDTO;
import com.elink.esua.epdc.dto.issue.form.NewIssueFormDTO;
import com.elink.esua.epdc.dto.issue.result.HotIssueResultDTO;
import com.elink.esua.epdc.dto.issue.result.IssueStatisticsInfoResultDTO;
import com.elink.esua.epdc.dto.issue.result.NewIssueResultDTO;
import com.elink.esua.epdc.modules.analysis.feign.AnalysisIssueFeignClient;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author LPF
 * @Date 2019/11/18 16:39
 */
@Component
public class AnalysisIssueFeignClientFallback implements AnalysisIssueFeignClient {


    @Override
    public Result test() {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "test");
    }

    @Override
    public Result<List<IssueStatisticsInfoResultDTO>> getStatisticsByCategory(IssueStatisticsInfoFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getStatisticsByCategory", formDto);
    }

    @Override
    public Result<List<NewIssueResultDTO>> getNewIssueList(NewIssueFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getNewIssueList", formDto);
    }

    @Override
    public Result<List<HotIssueResultDTO>> getHotIssueList(HotIssueFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getHotIssueList", formDto);
    }

}
