From 7710f067effe203c328175475fdba1181a2326c0 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 13 Oct 2021 16:01:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=BD=E5=8F=96=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/service/dataset/ExtractDataService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java index 00a9fd9564..d5e51ac5ec 100644 --- a/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java +++ b/backend/src/main/java/io/dataease/service/dataset/ExtractDataService.java @@ -959,12 +959,12 @@ public class ExtractDataService { outputFields[datasetTableFields.size()] = textFileField; textFileOutputMeta.setOutputFields(outputFields); - }else if (datasource.getType().equalsIgnoreCase(DatasourceTypes.sqlServer.name()) || datasource.getType().equalsIgnoreCase(DatasourceTypes.pg.name())){ + }else if (datasource.getType().equalsIgnoreCase(DatasourceTypes.sqlServer.name()) || datasource.getType().equalsIgnoreCase(DatasourceTypes.pg.name()) || datasource.getType().equalsIgnoreCase(DatasourceTypes.mysql.name())){ TextFileField[] outputFields = new TextFileField[datasetTableFields.size() + 1]; for(int i=0;i< datasetTableFields.size();i++){ TextFileField textFileField = new TextFileField(); textFileField.setName(datasetTableFields.get(i).getDataeaseName()); - if (datasetTableFields.get(i).getDeExtractType() == 1) { + if (datasetTableFields.get(i).getDeExtractType() == DeTypeConstants.DE_TIME) { textFileField.setType("String"); textFileField.setFormat("yyyy-MM-dd HH:mm:ss"); } else { @@ -984,7 +984,7 @@ public class ExtractDataService { for(int i=0;i< datasetTableFields.size();i++){ TextFileField textFileField = new TextFileField(); textFileField.setName(datasetTableFields.get(i).getDataeaseName()); - if (datasetTableFields.get(i).getDeExtractType() == 2) { + if (datasetTableFields.get(i).getDeExtractType() == DeTypeConstants.DE_INT) { textFileField.setType("Integer"); textFileField.setFormat("0"); } else {