mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix 修复脱敏实现逻辑问题
This commit is contained in:
		@@ -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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user