mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	update 优化 删除无意义的方法
This commit is contained in:
		@@ -43,19 +43,6 @@ public class ObjectUtils extends ObjectUtil {
 | 
			
		||||
        return defaultValue;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 如果值不为空,则返回值
 | 
			
		||||
     *
 | 
			
		||||
     * @param obj          对象
 | 
			
		||||
     * @return 对象字段
 | 
			
		||||
     */
 | 
			
		||||
    public static <T> T notNull(T obj) {
 | 
			
		||||
        if (isNotNull(obj)) {
 | 
			
		||||
            return obj;
 | 
			
		||||
        }
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 如果值不为空,则返回值,否则返回默认值
 | 
			
		||||
     *
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,10 @@ public class InjectionMetaObjectHandler implements MetaObjectHandler {
 | 
			
		||||
                baseEntity.setUpdateTime(current);
 | 
			
		||||
 | 
			
		||||
                // 获取当前登录用户的ID,并填充更新人信息
 | 
			
		||||
                baseEntity.setUpdateBy(ObjectUtils.notNull(LoginHelper.getUserId()));
 | 
			
		||||
                Long userId = LoginHelper.getUserId();
 | 
			
		||||
                if (ObjectUtil.isNotNull(userId)) {
 | 
			
		||||
                    baseEntity.setUpdateBy(userId);
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                this.strictUpdateFill(metaObject, "updateTime", Date.class, new Date());
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user