buhuazhen
2 天以前 999831f197f3967f166c5c28cf52835b48e0a258
src/main/java/com/ruoyi/common/config/MybatisHandler.java
@@ -13,8 +13,10 @@
    public void insertFill(MetaObject metaObject) {
        Integer userId = null;
        Long tenantId = null;
        String userName = null;
        try {
            userId = SecurityUtils.getUserId().intValue();
            userName = SecurityUtils.getUsername();
            tenantId = SecurityUtils.getLoginUser().getTenantId();
        } catch (Exception ignored) {
        }
@@ -22,6 +24,8 @@
        this.strictInsertFill(metaObject, "updateTime",  LocalDateTime.class, LocalDateTime.now());
        this.strictInsertFill(metaObject, "createUser", Integer.class, userId);
        this.strictInsertFill(metaObject, "updateUser", Integer.class, userId);
        this.strictInsertFill(metaObject, "createUserName", String.class, userName);
        this.strictInsertFill(metaObject, "updateUserName", String.class, userName);
        this.strictInsertFill(metaObject, "tenantId", Long.class, tenantId);
    }