Commit f944da4ba8fb7b96120cca5ec86fe9916b454b6c

Authored by zhangdaiscott
1 parent cba7030d

sysUser中rel_tenant_ids为空时,可能导致MybatisPlusConfig中出现空指针异常

jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisPlusConfig.java
... ... @@ -12,6 +12,7 @@ import net.sf.jsqlparser.expression.operators.relational.ExpressionList;
12 12 import net.sf.jsqlparser.expression.operators.relational.InExpression;
13 13 import net.sf.jsqlparser.schema.Column;
14 14 import org.apache.ibatis.reflection.MetaObject;
  15 +import org.jeecg.common.util.oConvertUtils;
15 16 import org.mybatis.spring.annotation.MapperScan;
16 17 import org.springframework.context.annotation.Bean;
17 18 import org.springframework.context.annotation.Configuration;
... ... @@ -72,7 +73,7 @@ public class MybatisPlusConfig {
72 73  
73 74 @Override
74 75 public Expression getTenantId(boolean select) {
75   - String tenant_id = TenantContext.getTenant();
  76 + String tenant_id = oConvertUtils.getString(TenantContext.getTenant(),"0");
76 77 return new LongValue(tenant_id);
77 78 }
78 79 @Override
... ...