From 2df341897ca2574dee9857bc07634be835cde76f Mon Sep 17 00:00:00 2001 From: taojinlong Date: Mon, 6 Mar 2023 15:45:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=97=B6=E5=90=8D=E7=A7=B0=E4=B8=8D=E8=83=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/service/dataset/DataSetTableService.java | 3 +++ backend/src/main/resources/i18n/messages_en_US.properties | 1 + backend/src/main/resources/i18n/messages_zh_CN.properties | 1 + backend/src/main/resources/i18n/messages_zh_TW.properties | 1 + 4 files changed, 6 insertions(+) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index c6c75b97ed..afa591b348 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -2264,6 +2264,9 @@ public class DataSetTableService { } Set nameSet = new HashSet<>(); for (DataSetTableRequest table : datasetTable) { + if(StringUtils.isEmpty(table.getName())){ + throw new RuntimeException(Translator.get("I18n_name_cant_empty")); + } nameSet.add(table.getName()); } if (nameSet.size() != datasetTable.size()) { diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 3e0774c086..9f52ae39b0 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -272,3 +272,4 @@ I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=Default template only screenshot \u8FB9\u68468=Border 8 \u8FB9\u68469=Border 9 \u8FB9\u684610=Border 10 +I18n_name_cant_empty=Name can not be empty! \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 4016b32f2f..7634ab45ad 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -262,4 +262,5 @@ I18N_LOG_FORMAT_PREFIX=\u4EE5%s\u3010%s\u3011\u6743\u9650 I18N_CRON_ERROR=cron\u8868\u8FBE\u5F0F\u9519\u8BEF I18N_PANEL_PDF_TEMPLATE_WITH_PARAMS=\u9ED8\u8BA4\u6A21\u677F(\u52A0\u53C2\u6570\u6837\u5F0F) I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=\u9ED8\u8BA4\u6A21\u677F(\u53EA\u622A\u56FE) +I18n_name_cant_empty=名称不能为空! diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index e9041808b6..fe4718a71d 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -268,3 +268,4 @@ I18N_PANEL_PDF_TEMPLATE_ONLY_PIC=\u9ED8\u8A8D\u6A21\u677F(\u53EA\u622A\u5716) \u8FB9\u68468=\u908A\u6846 8 \u8FB9\u68469=\u908A\u6846 9 \u8FB9\u684610=\u908A\u6846 10 +I18n_name_cant_empty=名稱不能為空! \ No newline at end of file