From 1a446007c7b757578e250a24e67e05f375cca841 Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Wed, 19 Jun 2024 10:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=A7=9F=E6=88=B7=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E4=BF=9D=E5=AD=98=E9=97=AE=E9=A2=98=20=EF=BC=8C?= =?UTF-8?q?=E5=A4=9A=E7=A7=9F=E6=88=B7=E6=A8=A1=E5=BC=8F=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E3=80=90=E7=A7=9F=E6=88=B7=E8=A7=92=E8=89=B2=E3=80=91=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=A7=92=E8=89=B2=E5=90=8E=EF=BC=8C=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=E7=9C=8B=E4=B8=8D=E5=88=B0=E6=96=B0=E5=A2=9E=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/config/mybatis/MybatisInterceptor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java b/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java index 59f643a1..aef22667 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java @@ -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); } }