From 2f59c3aa75dec87447bdda6265812d3b8ad11789 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 22 Mar 2022 10:26:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20api=E6=9D=83=E9=99=90aop=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=9C=9F=E5=AE=9E=E5=A0=86=E6=A0=88=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/auth/aop/DePermissionProxyHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/auth/aop/DePermissionProxyHandler.java b/backend/src/main/java/io/dataease/auth/aop/DePermissionProxyHandler.java index 7bfa88a893..f2b8e0818d 100644 --- a/backend/src/main/java/io/dataease/auth/aop/DePermissionProxyHandler.java +++ b/backend/src/main/java/io/dataease/auth/aop/DePermissionProxyHandler.java @@ -18,6 +18,7 @@ import io.dataease.auth.annotation.DePermissionProxy; import io.dataease.commons.utils.AuthUtils; import io.dataease.commons.utils.LogUtil; import io.dataease.dto.PermissionProxy; +import io.dataease.exception.DataEaseException; @Aspect @Component @@ -51,15 +52,18 @@ public class DePermissionProxyHandler { } catch (Throwable throwable) { LogUtil.error(throwable.getMessage(), throwable); - throw new RuntimeException(throwable.getMessage()); + /* throw new RuntimeException(throwable.getMessage()); */ + DataEaseException.throwException(throwable); } finally { AuthUtils.cleanProxyUser(); } + return null; } private PermissionProxy getProxy(Object arg, DePermissionProxy annotation, int layer) throws Exception { - if(null == arg) return null; + if (null == arg) + return null; String value = annotation.value(); Class parameterType = arg.getClass(); if (arg instanceof PermissionProxy) {