diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index 9ddd2f9c8e..fb1190985a 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/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","基层治理:徽章审核:徽章审核","徽章审核权限,目前这个模块的操作都用这一个权限控制,没有细分"), + /** * 工作-项目跟踪 */ diff --git a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java b/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java index 98583c8f3c..2ee22426f6 100644 --- a/epmet-gateway/src/main/java/com/epmet/auth/InternalAuthProcessor.java +++ b/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; diff --git a/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java b/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java index 4b801182fa..3442dea612 100644 --- a/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java +++ b/epmet-gateway/src/main/java/com/epmet/filter/CpProperty.java @@ -22,6 +22,11 @@ public class CpProperty { */ private List internalAuthUrls; + /** + * 内部认证url白名单 + */ + private List internalAuthUrlsWhiteList; + /** * 对外部应用开放的url列表 */ diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index ad698b4d8a..53ec286911 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/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/** diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index ca8aa468dc..d8e6a43485 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/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(); } diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java index 5f20efd13a..bdfb2e9d8d 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/feign/ResiGroupOpenFeignClient.java +++ b/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 { /**