解决租户角色保存问题 ,多租户模式下,【租户角色】新增角色后,列表中看不到新增记录

pull/6339/head
JEECG 2024-06-19 10:02:22 +08:00
parent 76f9575140
commit 1a446007c7
1 changed files with 8 additions and 1 deletions

View File

@ -106,7 +106,14 @@ public class MybatisInterceptor implements Interceptor {
//e.printStackTrace();
}
}
field.set(parameter, tenantId);
if (field.getType().equals(String.class)) {
// 字段类型为String
field.set(parameter, tenantId);
} else {
// 字段类型不是String
field.set(parameter, oConvertUtils.getInt(tenantId, 0));
}
field.setAccessible(false);
}
}