style: optimize

This commit is contained in:
开源海哥 2023-08-13 09:28:47 +08:00
parent 3c8da34040
commit 129bc2cdc7
2 changed files with 4 additions and 4 deletions

View File

@ -62,7 +62,7 @@ public class MybatisKeyGeneratorUtil {
return NoKeyGenerator.INSTANCE;
}
FlexGlobalConfig.KeyConfig globalKeyConfig = FlexGlobalConfig.getConfig(ms.getConfiguration()).getKeyConfig();
FlexGlobalConfig.KeyConfig globalKeyConfig = flexGlobalConfig.getKeyConfig();
KeyType keyType = getKeyType(idInfo, globalKeyConfig);
if (keyType == null || keyType == KeyType.None) {

View File

@ -33,6 +33,7 @@ import java.lang.reflect.Method;
/**
* @author michael
* @author norkts
*/
public class MapperInvocationHandler implements InvocationHandler {
@ -41,12 +42,11 @@ public class MapperInvocationHandler implements InvocationHandler {
public MapperInvocationHandler(Object mapper, DataSource dataSource) {
this.mapper = mapper;
if(dataSource instanceof FlexDataSource){
if (dataSource instanceof FlexDataSource) {
this.dataSource = (FlexDataSource) dataSource;
}else{
} else {
this.dataSource = null;
}
}