@ -710,7 +710,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
strategyConfig = StrategyConfigAttrUtils . getStrategyConfig ( dsName ) ;
strategyConfig = StrategyConfigAttrUtils . getStrategyConfig ( dsName ) ;
if ( useGlobal ( getTableData ( ) , strategyConfig , tplPath ) ) {
if ( useGlobal ( getTableData ( ) , strategyConfig ) ) {
//使用全局配置
//使用全局配置
strategyConfig = StrategyConfigHelper . createStrategyConfig ( true ) ;
strategyConfig = StrategyConfigHelper . createStrategyConfig ( true ) ;
} else if ( getTableData ( ) . isShare ( ) ) {
} else if ( getTableData ( ) . isShare ( ) ) {
@ -722,14 +722,13 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
return strategyConfig ;
return strategyConfig ;
}
}
private boolean useGlobal ( DBTableData dbTableData , StrategyConfig strategyConfig , String tplPath ) {
private boolean useGlobal ( DBTableData dbTableData , StrategyConfig strategyConfig ) {
//非共享且配置为空或者指定使用全局配置时,检查是否全局开启
//非共享且配置为空或者指定使用全局配置时,检查是否全局开启
if ( ! dbTableData . isShare ( ) & & ( strategyConfig = = null | | strategyConfig . isUseGlobal ( ) ) ) {
if ( strategyConfig = = null ) {
//模版里面没有配置,检查模版是否被开启
return ! dbTableData . isShare ( ) ;
return StrategyConfigService . isTemplateEnabled ( tplPath ) ;
} else {
return strategyConfig . isUseGlobal ( ) ;
}
}
return false ;
}
}
@Override
@Override