Merge pull request #7008 from dataease/pr@dev-v2@fix_template-error-tips

fix: 修复模版中存在过滤组件时应用有报错提示问题
This commit is contained in:
王嘉豪 2023-12-05 15:18:08 +08:00 committed by GitHub
commit 805118dc2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ import io.dataease.api.dataset.dto.PreviewSqlDTO;
import io.dataease.api.dataset.union.DatasetGroupInfoDTO;
import io.dataease.dataset.manage.DatasetDataManage;
import io.dataease.dto.dataset.DatasetTableFieldDTO;
import io.dataease.utils.LogUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -43,8 +44,15 @@ public class DatasetDataServer implements DatasetDataApi {
}
@Override
public List<String> getFieldEnum(List<Long> ids) throws Exception {
return datasetDataManage.getFieldEnum(ids);
public List<String> getFieldEnum(List<Long> ids) {
try{
return datasetDataManage.getFieldEnum(ids);
}catch (Exception e){
e.printStackTrace();
LogUtil.error(e);
return null;
}
}
@Override