(improvement)(semantic) Metric homepage download supports choosing whether to transform (#480)

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2023-12-08 13:20:27 +08:00
committed by GitHub
parent ca8d7d89c1
commit 18b52ec742
6 changed files with 19 additions and 174 deletions

View File

@@ -70,8 +70,8 @@ public class DownloadServiceImpl implements DownloadService {
String fileName = String.format("%s_%s.xlsx", "supersonic", DateUtils.format(new Date(), DateUtils.FORMAT));
File file = FileUtils.createTmpFile(fileName);
try {
QueryResultWithSchemaResp queryResultWithSchemaResp = queryService.queryByStruct(downloadStructReq, user);
DataDownload dataDownload = buildDataDownload(queryResultWithSchemaResp, downloadStructReq);
QueryResultWithSchemaResp queryResult = queryService.queryByStructWithAuth(downloadStructReq, user);
DataDownload dataDownload = buildDataDownload(queryResult, downloadStructReq);
EasyExcel.write(file).sheet("Sheet1").head(dataDownload.getHeaders()).doWrite(dataDownload.getData());
} catch (RuntimeException e) {
EasyExcel.write(file).sheet("Sheet1").head(buildErrMessageHead())