4 changed files with 105 additions and 2 deletions
			
			
		| @ -0,0 +1,27 @@ | |||||
|  | package com.elink.esua.epdc.dto.note.result; | ||||
|  | 
 | ||||
|  | import lombok.Data; | ||||
|  | 
 | ||||
|  | import java.io.Serializable; | ||||
|  | import java.util.List; | ||||
|  | import java.util.Map; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @program: epdc-cloud-analysis | ||||
|  |  * @description: 街道、社区排行 | ||||
|  |  * @author: wangtong | ||||
|  |  * @create: 2020-11-25 09:22 | ||||
|  |  **/ | ||||
|  | @Data | ||||
|  | public class DeptRankResultDTO implements Serializable { | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 街道排行 | ||||
|  |      */ | ||||
|  |     private Map<String,Integer> streetRank; | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 社区排行 | ||||
|  |      */ | ||||
|  |     private Map<String,Integer> communityRank; | ||||
|  | } | ||||
| @ -0,0 +1,40 @@ | |||||
|  | package com.elink.esua.epdc.feign; | ||||
|  | 
 | ||||
|  | import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; | ||||
|  | import com.elink.esua.epdc.commons.tools.utils.Result; | ||||
|  | import com.elink.esua.epdc.dto.note.result.DeptRankResultDTO; | ||||
|  | import com.elink.esua.epdc.feign.fallback.AnalysisFeignClientFallback; | ||||
|  | import org.springframework.cloud.openfeign.FeignClient; | ||||
|  | import org.springframework.http.MediaType; | ||||
|  | import org.springframework.web.bind.annotation.GetMapping; | ||||
|  | 
 | ||||
|  | import java.util.List; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  *  调用 社区 街道 综合指标排名 | ||||
|  |  * @Author wk | ||||
|  |  * @Date 2022/11/25 11:00 | ||||
|  |  */ | ||||
|  | @FeignClient(name = ServiceConstant.EPDC_ANALYSIS_SERVER, fallback = AnalysisFeignClientFallback.class) | ||||
|  | public interface AnalysisFeignClient { | ||||
|  | 
 | ||||
|  | 
 | ||||
|  |     /** | ||||
|  |      * 测试 | ||||
|  |      * @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(); | ||||
|  |     /* | ||||
|  |      *  | ||||
|  |      * 调用街道,社区排名接口  | ||||
|  |      * @author wk  | ||||
|  |      * @date 2020-11-25 10:16 | ||||
|  |      * @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.note.result.DeptRankResultDTO> | ||||
|  |      */ | ||||
|  |     @GetMapping(value = "analysis/performanceScore/getDeptRank", consumes = MediaType.APPLICATION_JSON_VALUE) | ||||
|  |     Result<DeptRankResultDTO> getDeptRank(); | ||||
|  | 
 | ||||
|  | } | ||||
| @ -0,0 +1,29 @@ | |||||
|  | package com.elink.esua.epdc.feign.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.note.result.DeptRankResultDTO; | ||||
|  | import com.elink.esua.epdc.feign.AnalysisFeignClient; | ||||
|  | import org.springframework.stereotype.Component; | ||||
|  | 
 | ||||
|  | import java.util.List; | ||||
|  | 
 | ||||
|  | /** | ||||
|  |  * @Author LPF | ||||
|  |  * @Date 2019/11/18 16:39 | ||||
|  |  */ | ||||
|  | @Component | ||||
|  | public class AnalysisFeignClientFallback implements AnalysisFeignClient { | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     public Result test() { | ||||
|  |         return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "test"); | ||||
|  |     } | ||||
|  | 
 | ||||
|  |     @Override | ||||
|  |     public Result<DeptRankResultDTO> getDeptRank() { | ||||
|  |         return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "getDeptRank"); | ||||
|  |     } | ||||
|  | 
 | ||||
|  | } | ||||
					Loading…
					
					
				
		Reference in new issue