Browse Source

调整,gov-mine取权限接口,引用gov-access-client

master
wxz 5 years ago
parent
commit
f3c2f7adcd
  1. 8
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java
  2. 28
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovAccessFeignClient.java
  3. 22
      epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallback.java

8
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java

@ -4,9 +4,12 @@ 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.InitDefaultOperationsFormDTO;
import com.epmet.dto.form.ListOpePermsFormDTO;
import com.epmet.feign.GovAccessFeignClient;
import org.springframework.stereotype.Component;
import java.util.Set;
/**
* @Description
* @Author sun
@ -19,4 +22,9 @@ public class GovAccessFeignClientFallBack implements GovAccessFeignClient {
public Result initDefaultOperationsForRoles(InitDefaultOperationsFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "initDefaultOperationsForRoles", formDTO);
}
@Override
public Result<Set<String>> listOperationPermissions(ListOpePermsFormDTO listOpePermsFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "listOperationPermissions", listOpePermsFormDTO);
}
}

28
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/GovAccessFeignClient.java

@ -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);
}

22
epmet-module/gov-mine/gov-mine-server/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallback.java

@ -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…
Cancel
Save