fix: 添加数据集时名称不能为空

This commit is contained in:
taojinlong 2023-03-06 15:45:04 +08:00
parent b8eead37f7
commit 2df341897c
4 changed files with 6 additions and 0 deletions

View File

@ -2264,6 +2264,9 @@ public class DataSetTableService {
}
Set<String> 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()) {

View File

@ -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!

View File

@ -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=名称不能为空!

View File

@ -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=名稱不能為空!