|
|
|
@ -710,7 +710,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
|
|
|
|
|
strategyConfig = StrategyConfigAttrUtils.getStrategyConfig(dsName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (useGlobal(getTableData(), strategyConfig, tplPath)) { |
|
|
|
|
if (useGlobal(getTableData(), strategyConfig)) { |
|
|
|
|
//使用全局配置
|
|
|
|
|
strategyConfig = StrategyConfigHelper.createStrategyConfig(true); |
|
|
|
|
} else if (getTableData().isShare()) { |
|
|
|
@ -722,14 +722,13 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> {
|
|
|
|
|
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())) { |
|
|
|
|
//模版里面没有配置,检查模版是否被开启
|
|
|
|
|
return StrategyConfigService.isTemplateEnabled(tplPath); |
|
|
|
|
if (strategyConfig == null) { |
|
|
|
|
return !dbTableData.isShare(); |
|
|
|
|
} else { |
|
|
|
|
return strategyConfig.isUseGlobal(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|