forked from github/dataease
Merge pull request #13024 from dataease/pr@dev-v2@fixExportData
Pr@dev v2@fix export data
This commit is contained in:
commit
5f04656094
@ -14,7 +14,7 @@ public class CommonConfig {
|
||||
@Bean(destroyMethod = "shutdown")
|
||||
public CommonThreadPool resourcePoolThreadPool() {
|
||||
CommonThreadPool commonThreadPool = new CommonThreadPool();
|
||||
commonThreadPool.setCorePoolSize(20);
|
||||
commonThreadPool.setCorePoolSize(50);
|
||||
commonThreadPool.setMaxQueueSize(100);
|
||||
commonThreadPool.setKeepAliveSeconds(3600);
|
||||
return commonThreadPool;
|
||||
|
@ -1391,11 +1391,14 @@ public class CalciteProvider extends Provider {
|
||||
Connection connection = take();
|
||||
CalciteConnection calciteConnection = connection.unwrap(CalciteConnection.class);
|
||||
SchemaPlus rootSchema = calciteConnection.getRootSchema();
|
||||
if (rootSchema.getSubSchema(String.format(SQLConstants.SCHEMA, dsId)) == null) {
|
||||
DEException.throwException("请检查数据源的有效性!");
|
||||
}
|
||||
JdbcSchema jdbcSchema = rootSchema.getSubSchema(String.format(SQLConstants.SCHEMA, dsId)).unwrap(JdbcSchema.class);
|
||||
BasicDataSource basicDataSource = (BasicDataSource) jdbcSchema.getDataSource();
|
||||
return basicDataSource.getConnection();
|
||||
} catch (Exception e) {
|
||||
DEException.throwException("连接无效");
|
||||
DEException.throwException("连接无效, " + e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -84,15 +84,10 @@ public class H2EngineProvider extends EngineProvider {
|
||||
int size = tableField.getPrecision() * 4;
|
||||
switch (tableField.getDeType()) {
|
||||
case 0:
|
||||
Column_Fields.append("longtext").append(",`");
|
||||
Column_Fields.append("varchar(2048)").append(",`");
|
||||
break;
|
||||
case 1:
|
||||
size = size < 50 ? 50 : size;
|
||||
if (size < 65533) {
|
||||
Column_Fields.append("varchar(length)".replace("length", String.valueOf(tableField.getPrecision()))).append(",`");
|
||||
} else {
|
||||
Column_Fields.append("longtext").append(",`");
|
||||
}
|
||||
Column_Fields.append("varchar(2048)").append(",`");
|
||||
break;
|
||||
case 2:
|
||||
Column_Fields.append("bigint(20)").append(",`");
|
||||
@ -104,11 +99,7 @@ public class H2EngineProvider extends EngineProvider {
|
||||
Column_Fields.append("TINYINT(length)".replace("length", String.valueOf(tableField.getPrecision()))).append(",`");
|
||||
break;
|
||||
default:
|
||||
if (size < 65533) {
|
||||
Column_Fields.append("varchar(length)".replace("length", String.valueOf(tableField.getPrecision()))).append(",`");
|
||||
} else {
|
||||
Column_Fields.append("longtext").append(",`");
|
||||
}
|
||||
Column_Fields.append("varchar(2048)").append(",`");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class MysqlEngineProvider extends EngineProvider {
|
||||
int size = tableField.getPrecision() * 4;
|
||||
switch (tableField.getDeExtractType()) {
|
||||
case 0:
|
||||
Column_Fields.append("longtext").append(",`");
|
||||
Column_Fields.append("varchar(2048)").append(",`");
|
||||
break;
|
||||
case 1:
|
||||
Column_Fields.append("datetime").append(",`");
|
||||
@ -104,7 +104,7 @@ public class MysqlEngineProvider extends EngineProvider {
|
||||
Column_Fields.append("TINYINT(length)".replace("length", String.valueOf(tableField.getPrecision()))).append(",`");
|
||||
break;
|
||||
default:
|
||||
Column_Fields.append("longtext").append(",`");
|
||||
Column_Fields.append("varchar(2048)").append(",`");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ defineExpose({
|
||||
<Icon name="icon_close_outlined"><icon_close_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
<div class="datasource">
|
||||
<div class="datasource" v-loading="dsLoading">
|
||||
<div class="ds-type-select" v-if="!editDs">
|
||||
<div class="title">
|
||||
<el-input
|
||||
@ -778,7 +778,7 @@ defineExpose({
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
<div class="ds-editor" :class="editDs && 'edit-ds'" v-loading="dsLoading">
|
||||
<div class="ds-editor" :class="editDs && 'edit-ds'">
|
||||
<div v-show="activeStep !== 0 && !editDs" class="ds-type-title">
|
||||
{{ typeTitle }}
|
||||
</div>
|
||||
@ -816,7 +816,7 @@ defineExpose({
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-footer" v-loading="dsLoading">
|
||||
<div class="editor-footer">
|
||||
<el-button secondary @click="beforeClose"> {{ t('common.cancel') }}</el-button>
|
||||
<el-button
|
||||
v-show="!(activeStep === 0 || (editDs && activeApiStep <= 1))"
|
||||
|
Loading…
Reference in New Issue
Block a user