mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	update 优化 操作日志密码脱敏
This commit is contained in:
		@@ -1,5 +1,7 @@
 | 
			
		||||
package com.ruoyi.framework.aspectj;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.lang.Dict;
 | 
			
		||||
import cn.hutool.core.map.MapUtil;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
import com.ruoyi.common.annotation.Log;
 | 
			
		||||
import com.ruoyi.common.core.domain.dto.OperLogDTO;
 | 
			
		||||
@@ -147,7 +149,13 @@ public class LogAspect {
 | 
			
		||||
            for (Object o : paramsArray) {
 | 
			
		||||
                if (ObjectUtil.isNotNull(o) && !isFilterObject(o)) {
 | 
			
		||||
                    try {
 | 
			
		||||
                        params.append(JsonUtils.toJsonString(o)).append(" ");
 | 
			
		||||
                        String str = JsonUtils.toJsonString(o);
 | 
			
		||||
                        Dict dict = JsonUtils.parseMap(str);
 | 
			
		||||
                        if (MapUtil.isNotEmpty(dict)) {
 | 
			
		||||
                            MapUtil.removeAny(dict, EXCLUDE_PROPERTIES);
 | 
			
		||||
                            str = JsonUtils.toJsonString(dict);
 | 
			
		||||
                        }
 | 
			
		||||
                        params.append(str).append(" ");
 | 
			
		||||
                    } catch (Exception e) {
 | 
			
		||||
                        e.printStackTrace();
 | 
			
		||||
                    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user