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.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.service.impl.fallback.AnalysisIssueFeignClientFallback;
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 = AnalysisIssueFeignClientFallback.class, configuration = FeignRequestInterceptor.class)
public interface AnalysisIssueFeignClient {



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

    /**
     * @Description: 议题项目数量类目分析 
     * @Param: [formDto] 
     * @return: com.elink.esua.epdc.commons.tools.utils.Result<java.util.List<com.elink.esua.epdc.dto.issue.result.IssueStatisticsInfoResultDTO>>
     * @Author: zy 
     * @Date: 2020-02-11 
     */
    @GetMapping(value = "analysis/appissue/getStatisticsByCategory")
    Result<List<IssueStatisticsInfoResultDTO>> getStatisticsByCategory(IssueStatisticsInfoFormDTO formDto);

    /**
     * 最新发布议题接口
     * @param formDto
     * @return
     */
    @GetMapping(value = "analysis/appissue/getNewIssueList")
    Result<List<NewIssueResultDTO>> getNewIssueList(NewIssueFormDTO formDto);

    /**
     * 最热议题接口
     * @param formDto
     * @return
     */
    @GetMapping(value = "analysis/appissue/getHotIssueList")
    Result<List<HotIssueResultDTO>> getHotIssueList(HotIssueFormDTO formDto);
}
