2026-08-24 6dc5a6150f42a2c8c138f3eea141331d909ec435
src/main/java/com/ruoyi/common/config/MybatisHandler.java
@@ -15,10 +15,12 @@
        Integer userId = null;
        Long tenantId = null;
        String userName = null;
        Long deptId = null;
        try {
            userId = SecurityUtils.getUserId().intValue();
            tenantId = SecurityUtils.getLoginUser().getTenantId();
            userName = SecurityUtils.getUsername();
            deptId = SecurityUtils.getLoginUser().getCurrentDeptId();
        } catch (Exception ignored) {
        }
        this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
@@ -29,7 +31,7 @@
        this.strictInsertFill(metaObject, "updateUser", Long.class, userId == null ? 0 : userId.longValue());
        this.strictInsertFill(metaObject, "createUserName", String.class, userName);
        this.strictInsertFill(metaObject, "updateUserName", String.class, userName);
        this.strictInsertFill(metaObject, "deptId", Long.class, deptId);
        this.strictInsertFill(metaObject, "tenantId", Long.class, tenantId);
    }