Browse Source

Merge branch 'dev_temp' of http://121.42.41.42:7070/r/epmet-cloud into dev_temp

# Conflicts:
#	epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java
dev_shibei_match
liushaowen 5 years ago
parent
commit
d8ea7df7c6
  1. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java
  2. 6
      epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java
  3. 5
      epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java
  4. 4
      epmet-gateway/src/main/resources/bootstrap.yml
  5. 2
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java
  6. 2
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java

@ -87,6 +87,11 @@ public enum RequirePermissionEnum {
WORK_GRASSROOTS_ISSUE_SHIFT_PROJECT("work_grassroots_issue_shift_project", "基层治理:议题管理:转项目","转项目(选择处理部门api也需要添加此校验)"),
WORK_GRASSROOTS_ISSUE_CLOSE("work_grassroots_issue_close","基层治理:议题管理:关闭议题","关闭议题"),
/**
* 徽章
*/
WORK_GRASSROOTS_BADGE_AUDIT("work_grassroots_badge_audit","基层治理:徽章审核:徽章审核","徽章审核权限,目前这个模块的操作都用这一个权限控制,没有细分"),
/**
* 工作-项目跟踪
*/

6
epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java

@ -131,6 +131,12 @@ public class InternalAuthProcessor extends AuthProcessor {
* @return
*/
private boolean needAuth(String requestUri) {
for (String url : cpProperty.getInternalAuthUrlsWhiteList()) {
if (antPathMatcher.match(url, requestUri)) {
return false;
}
}
for (String url : cpProperty.getInternalAuthUrls()) {
if (antPathMatcher.match(url, requestUri)) {
return true;

5
epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java

@ -22,6 +22,11 @@ public class CpProperty {
*/
private List<String> internalAuthUrls;
/**
* 内部认证url白名单
*/
private List<String> internalAuthUrlsWhiteList;
/**
* 对外部应用开放的url列表
*/

4
epmet-gateway/src/main/resources/bootstrap.yml

@ -439,6 +439,10 @@ epmet:
- /resi/home/**
- /data/report/**
# 内部认证url白名单(在白名单中的,就不会再校验登录了)
internalAuthUrlsWhiteList:
- /epmetuser/customerstaff/customerlist
# 外部应用认证,使用AccessToken等头进行认证
externalOpenUrls:
- /data/report/**

2
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java

@ -365,7 +365,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
StringBuilder govKey = new StringBuilder(customerId).append(":").append(WxmpMessageConstant.GOV_REDIS);
authorizerRefreshToken = new HashMap<>();
try {
authorizerRefreshToken = wxmpMessageRedis.getAuthorizerRefreshToken(resiKey.toString());
authorizerRefreshToken = wxmpMessageRedis.getAuthorizerRefreshToken(govKey.toString());
} catch (Exception e) {
errorMsg = e.getMessage();
}

2
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java

@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@ -31,6 +32,7 @@ import java.util.List;
* @date 2020/6/4 13:16
*/
@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class)
//@FeignClient(name = ServiceConstant.RESI_GROUP_SERVER, fallback = ResiGroupOpenFeignClientFallback.class,url = "localhost:8095")
public interface ResiGroupOpenFeignClient {
/**

Loading…
Cancel
Save