package com.elink.esua.epdc.modules.analysis.feign;

import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.config.FeignRequestInterceptor;
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.service.impl.fallback.AnalysisUserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * 数据分析模块调用-移动app端
 * @Author LPF
 * @Date 2019/11/18 16:39
 */
@FeignClient(name = ServiceConstant.EPDC_ANALYSIS_SERVER, fallback = AnalysisUserFeignClientFallback.class, configuration = FeignRequestInterceptor.class)
public interface AnalysisUserFeignClient {



    /**
     * 测试
     * @Return: com.elink.esua.epdc.commons.tools.utils.Result
     * @Author: lipengfei
     * @Date: 2019/11/19 16:42
     */
    @GetMapping(value = "analysis/user/test", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result test();


    /**
     * @Description   党员老龄化排名列表
     * @Author songyunpeng
     * @Date  2020/2/11
     * @Param [formDto]
     * @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.user.result.OldMemberRankResultDTO>>
     **/
    @GetMapping(value = "analysis/user/partyMemberOldSort", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result<List<OldMemberRankResultDTO>> listOldMemberRankByDeptId(MemberRankFormDTO formDto);
    /**
     * @Description   党员年轻化化排名列表
     * @Author songyunpeng
     * @Date  2020/2/11
     * @Param [formDto]
     * @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.user.result.OldMemberRankResultDTO>>
     **/
    @GetMapping(value = "analysis/user/partyMemberYoungSort", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result<List<YoungMemberRankResultDTO>> listYoungMemberRankByDeptId(MemberRankFormDTO formDto);
    /**
     * @Description  注册用户数排名
     * @Author lpf
     * @Date  2020/2/11
     * @Param [formDto]
     * @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.user.result.UserSortRankResultDTO>>
     **/
    @GetMapping(value = "analysis/user/userRegisterSort", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result<List<UserSortRankResultDTO>> userRegisterSort(UserSortRankFormDTO formDto);

    /**
     *用户数据统计
     *
     * @author wangtong
     * @date 2020/2/12 10:10
     * @param [formDto]
     * @return com.elink.esua.epdc.commons.tools.utils.Result
     */
    @GetMapping(value = "analysis/user/getUserStatistics", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result getUserStatistics(UserCountDTO formDto);

    /**
     *网格开通状况
     *
     * @author wangtong
     * @date 2020/2/12 10:10
     * @param [formDto]
     * @return com.elink.esua.epdc.commons.tools.utils.Result
     */
    @GetMapping(value = "analysis/user/getGridStatistics", consumes = MediaType.APPLICATION_JSON_VALUE)
    Result getGridStatistics(UserCountDTO formDto);


}
