forked from rongchao/epmet-cloud-rizhao
				
			
				 3 changed files with 8 additions and 50 deletions
			
			
		| @ -1,28 +0,0 @@ | |||
| package com.epmet.feign; | |||
| 
 | |||
| import com.epmet.commons.tools.constant.ServiceConstant; | |||
| import com.epmet.commons.tools.utils.Result; | |||
| import com.epmet.dto.form.ListOpePermsFormDTO; | |||
| import com.epmet.feign.fallback.GovAccessFeignClientFallback; | |||
| import org.springframework.cloud.openfeign.FeignClient; | |||
| import org.springframework.web.bind.annotation.PostMapping; | |||
| import org.springframework.web.bind.annotation.RequestBody; | |||
| 
 | |||
| import java.util.Set; | |||
| 
 | |||
| /** | |||
|  * @Description | |||
|  * @Author sun | |||
|  */ | |||
| //url = "localhost:8099"
 | |||
| @FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = GovAccessFeignClientFallback.class) | |||
| public interface GovAccessFeignClient { | |||
| 
 | |||
|     /** | |||
|      * 列出觉得的功能权限列表 | |||
|      * @return | |||
|      */ | |||
|     @PostMapping("/gov/access/access/listoperationpermissions") | |||
|     Result<Set<String>> listOperationPermissions(@RequestBody ListOpePermsFormDTO listOpePermsFormDTO); | |||
| 
 | |||
| } | |||
| @ -1,22 +0,0 @@ | |||
| package com.epmet.feign.fallback; | |||
| 
 | |||
| import com.epmet.commons.tools.constant.ServiceConstant; | |||
| import com.epmet.commons.tools.utils.ModuleUtils; | |||
| import com.epmet.commons.tools.utils.Result; | |||
| import com.epmet.dto.form.ListOpePermsFormDTO; | |||
| import com.epmet.feign.GovAccessFeignClient; | |||
| import org.springframework.stereotype.Component; | |||
| import java.util.Set; | |||
| 
 | |||
| /** | |||
|  * @Description | |||
|  * @Author sun | |||
|  */ | |||
| @Component | |||
| public class GovAccessFeignClientFallback implements GovAccessFeignClient { | |||
| 
 | |||
| 	@Override | |||
| 	public Result<Set<String>> listOperationPermissions(ListOpePermsFormDTO listOpePermsFormDTO) { | |||
| 		return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "listOperationPermissions", listOpePermsFormDTO); | |||
| 	} | |||
| } | |||
					Loading…
					
					
				
		Reference in new issue