forked from github/dataease
feat(fix):自定义数据集错误提示优化
This commit is contained in:
parent
dce12e6057
commit
137ddafd7e
@ -483,7 +483,14 @@ public class DataSetTableService {
|
||||
Map<String, String[]> customInfo = new TreeMap<>();
|
||||
dataTableInfoDTO.getList().forEach(ele -> {
|
||||
String table = DorisTableUtils.dorisName(ele.getTableId());
|
||||
DatasetTable datasetTable = datasetTableMapper.selectByPrimaryKey(ele.getTableId());
|
||||
if (ObjectUtils.isEmpty(datasetTable)) {
|
||||
throw new RuntimeException(Translator.get("i18n_custom_ds_delete"));
|
||||
}
|
||||
List<DatasetTableField> fields = dataSetTableFieldsService.getListByIdsEach(ele.getCheckedFields());
|
||||
if (CollectionUtils.isEmpty(fields)) {
|
||||
throw new RuntimeException(Translator.get("i18n_cst_ds_tb_or_field_deleted"));
|
||||
}
|
||||
String[] array = fields.stream().map(f -> table + "." + f.getDataeaseName() + " AS " + DorisTableUtils.dorisFieldName(ele.getTableId() + "_" + f.getDataeaseName())).toArray(String[]::new);
|
||||
customInfo.put(table, array);
|
||||
});
|
||||
@ -734,6 +741,7 @@ public class DataSetTableService {
|
||||
return o1.compareTo(o2);
|
||||
});
|
||||
}
|
||||
|
||||
private void checkName(DatasetTable datasetTable) {
|
||||
// if (StringUtils.isEmpty(datasetTable.getId()) && StringUtils.equalsIgnoreCase("db", datasetTable.getType())) {
|
||||
// return;
|
||||
|
@ -257,3 +257,4 @@ i18n_excel_header_empty=Excel first row can not empty
|
||||
i18n_custom_ds_delete=Custom dataset union data is deleted,can not display
|
||||
i18n_sql_add_not_matching=The data column of incremental SQL does not match the dataset,
|
||||
i18n_sql_delete_not_matching=The data column of incremental delete SQL does not match the dataset,
|
||||
i18n_cst_ds_tb_or_field_deleted=Custom dataset union data is deleted or field changed,can not display
|
@ -257,4 +257,5 @@ i18n_excel_header_empty=Excel第一行为空
|
||||
i18n_custom_ds_delete=自定义数据集所关联数据被删除,无法正常显示
|
||||
i18n_sql_add_not_matching=增量添加 sql 的数据列与数据集不匹配,
|
||||
i18n_sql_delete_not_matching=增量删除 sql 的数据列与数据集不匹配,
|
||||
i18n_cst_ds_tb_or_field_deleted=自定义数据集所关联数据被删除或字段发生变化,无法正常显示
|
||||
|
||||
|
@ -259,3 +259,4 @@ i18n_excel_header_empty=Excel第一行為空
|
||||
i18n_custom_ds_delete=自定義數據集所關聯數據被刪除,無法正常顯示
|
||||
i18n_sql_add_not_matching=增量添加 sql 的數據列與數據集不匹配,
|
||||
i18n_sql_delete_not_matching=增量刪除 sql 的數據列與數據集不匹配,
|
||||
i18n_cst_ds_tb_or_field_deleted=自定義數據集所關聯數據被刪除或字段發生變化,無法正常顯示
|
Loading…
Reference in New Issue
Block a user