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.user.form.MemberRankFormDTO;
import com.elink.esua.epdc.dto.user.form.UserCountDTO;
import com.elink.esua.epdc.dto.user.form.UserSortRankFormDTO;
import com.elink.esua.epdc.dto.user.result.OldMemberRankResultDTO;
import com.elink.esua.epdc.dto.user.result.UserSortRankResultDTO;
import com.elink.esua.epdc.dto.user.result.YoungMemberRankResultDTO;
import com.elink.esua.epdc.modules.analysis.feign.AnalysisUserFeignClient;
import org.springframework.stereotype.Component;

import java.util.List;

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


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

    @Override
    public Result<List<OldMemberRankResultDTO>> listOldMemberRankByDeptId(MemberRankFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "listOldMemberRankByDeptId",formDto);
    }

    @Override
    public Result<List<YoungMemberRankResultDTO>> listYoungMemberRankByDeptId(MemberRankFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "listYoungMemberRankByDeptId",formDto);
    }
    @Override
    public Result<List<UserSortRankResultDTO>> userRegisterSort(UserSortRankFormDTO formDto) {
        return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "userRegisterSort",formDto);
    }

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

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

}
