mirror of
https://github.com/dataease/dataease.git
synced 2026-05-14 12:22:10 +08:00
perf: 查询字体 API 报错超时
This commit is contained in:
committed by
fit2cloud-chenyw
parent
a20da4737a
commit
52edd06b3b
@@ -3,33 +3,27 @@ package io.dataease.font.manage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import io.dataease.api.font.dto.FontDto;
|
||||
import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.font.dao.auto.entity.CoreFont;
|
||||
import io.dataease.font.dao.auto.mapper.CoreFontMapper;
|
||||
import io.dataease.utils.*;
|
||||
import io.dataease.utils.BeanUtils;
|
||||
import io.dataease.utils.FileUtils;
|
||||
import io.dataease.utils.IDUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -44,7 +38,7 @@ public class FontManage {
|
||||
@Autowired
|
||||
private ResourceLoader resourceLoader;
|
||||
|
||||
public List<FontDto> list(FontDto fontDto) {
|
||||
public List<FontDto> list() {
|
||||
QueryWrapper<CoreFont> queryWrapper = new QueryWrapper<>();
|
||||
List<CoreFont> coreFonts = coreFontMapper.selectList(queryWrapper);
|
||||
List<FontDto> fontDtos = new ArrayList<>();
|
||||
|
||||
@@ -3,8 +3,8 @@ package io.dataease.font.server;
|
||||
import io.dataease.api.font.api.FontApi;
|
||||
import io.dataease.api.font.dto.FontDto;
|
||||
import io.dataease.exception.DEException;
|
||||
import jakarta.annotation.Resource;
|
||||
import io.dataease.font.manage.FontManage;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -20,8 +20,8 @@ public class FontServer implements FontApi {
|
||||
private FontManage fontManage;
|
||||
|
||||
@Override
|
||||
public List<FontDto> list(FontDto fontDto) {
|
||||
return fontManage.list(fontDto);
|
||||
public List<FontDto> list() {
|
||||
return fontManage.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,8 +8,8 @@ export interface Font {
|
||||
isBuiltin?: boolean
|
||||
}
|
||||
|
||||
export const list = (data = {}) => {
|
||||
return request.post({ url: '/typeface/listFont', data }).then(res => {
|
||||
export const list = () => {
|
||||
return request.get({ url: '/typeface/listFont' }).then(res => {
|
||||
return res?.data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package io.dataease.api.font.api;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
|
||||
import io.dataease.api.ds.vo.ExcelFileData;
|
||||
import io.dataease.api.font.dto.FontDto;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -22,8 +20,8 @@ import java.util.List;
|
||||
public interface FontApi {
|
||||
|
||||
@Operation(summary = "预览数据")
|
||||
@PostMapping("listFont")
|
||||
public List<FontDto> list(@RequestBody FontDto fontDto) throws Exception;
|
||||
@GetMapping("listFont")
|
||||
List<FontDto> list() throws Exception;
|
||||
|
||||
@Operation(summary = "创建")
|
||||
@PostMapping("/create")
|
||||
|
||||
Reference in New Issue
Block a user