fix 修复脱敏实现逻辑问题

feature/model
疯狂的狮子li 3 years ago
parent 4b07be6bfd
commit a3ba78d7bd

@ -27,9 +27,9 @@ public class SensitiveJsonSerializer extends JsonSerializer<String> 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);
}
}

@ -20,7 +20,7 @@ public class SysSensitiveServiceImpl implements SensitiveService {
*/
@Override
public boolean isSensitive() {
return LoginHelper.isAdmin();
return !LoginHelper.isAdmin();
}
}

Loading…
Cancel
Save