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.item.form.HotItemListFormDTO;
import com.elink.esua.epdc.dto.item.form.ItemAnalysisFormDTO;
import com.elink.esua.epdc.dto.item.form.ItemSurveyFormDTO;
import com.elink.esua.epdc.dto.item.result.HotItemListResultDTO;
import com.elink.esua.epdc.dto.item.result.ItemAnalysisResultDTO;
import com.elink.esua.epdc.dto.item.result.ItemSurveyResultDTO;
import com.elink.esua.epdc.modules.analysis.feign.AnalysisItemFeignClient;
import org.springframework.stereotype.Component;

import java.util.List;

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


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

    @Override
    public Result<ItemSurveyResultDTO> getItemSurvey(ItemSurveyFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getItemSurvey", formDto);
    }

    @Override
    public Result<List<ItemAnalysisResultDTO>> getItemAnalysis(ItemAnalysisFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getItemAnalysis", formDto);
    }

    @Override
    public Result<List<HotItemListResultDTO>> getHotItemList(HotItemListFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getHotItemList", formDto);
    }

}
