first commit
This commit is contained in:
@ -25,8 +25,8 @@ public class SchemaInterceptor implements InnerInterceptor {
|
||||
@Override
|
||||
public void beforePrepare(StatementHandler sh, Connection conn, Integer transactionTimeout) {
|
||||
|
||||
if (Objects.nonNull(BaseContext.getSchema()) && BaseContext.getSchema()) {
|
||||
// use qiaoba-1;
|
||||
if (Objects.nonNull(BaseContext.isSchemaMode()) && BaseContext.isSchemaMode()) {
|
||||
// eg: use qiaoba-1;
|
||||
String sql = StrUtil.format("use `{}-{}`;", baseDatabase, BaseContext.getTenantId());
|
||||
try {
|
||||
conn.createStatement().execute(sql);
|
||||
|
Reference in New Issue
Block a user