diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/jackson/SensitiveJsonSerializer.java b/ruoyi-common/src/main/java/com/ruoyi/common/jackson/SensitiveJsonSerializer.java index 55c4e6a7..404f393f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/jackson/SensitiveJsonSerializer.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/jackson/SensitiveJsonSerializer.java @@ -27,9 +27,9 @@ public class SensitiveJsonSerializer extends JsonSerializer implements C public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { SensitiveService sensitiveService = SpringUtils.getBean(SensitiveService.class); if (sensitiveService.isSensitive()) { - gen.writeString(value); - } else { gen.writeString(strategy.desensitizer().apply(value)); + } else { + gen.writeString(value); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java index 08d4cc4f..fe142ca3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java @@ -20,7 +20,7 @@ public class SysSensitiveServiceImpl implements SensitiveService { */ @Override public boolean isSensitive() { - return LoginHelper.isAdmin(); + return !LoginHelper.isAdmin(); } }