优化代码

This commit is contained in:
阿沐 2023-10-06 15:55:36 +08:00
parent 181a489908
commit 9a3775624c

View File

@ -47,9 +47,8 @@ public class DataScopeInnerInterceptor implements InnerInterceptor {
} }
// 判断参数里是否有DataScope对象 // 判断参数里是否有DataScope对象
if (parameter instanceof Map) { if (parameter instanceof Map<?, ?> parameterMap) {
Map<?, ?> parameterMap = (Map<?, ?>) parameter; for (Map.Entry<?, ?> entry : parameterMap.entrySet()) {
for (Map.Entry entry : parameterMap.entrySet()) {
if (entry.getValue() != null && entry.getValue() instanceof DataScope) { if (entry.getValue() != null && entry.getValue() instanceof DataScope) {
return (DataScope) entry.getValue(); return (DataScope) entry.getValue();
} }