@Override
    public String getChartData(Chart chart) {
        // 根据id查询数据库
        List<Map<String, String>> chartData = baseMapper.getChartDataByChartId(chart.getId());

        List<Collection<String>> excelData = new ArrayList<>();

        for (int i = 0; i < chartData.size(); i++) {
            Map<String, String> chartDatum = chartData.get(i);
            if (i == 0) {
                Set<String> keys = chartDatum.keySet();
                excelData.add(keys);
            } else {
                Collection<String> values = chartDatum.values();
                excelData.add(values);
            }
        }

        return JSONUtil.toJsonStr(excelData);
    }
@Test
    void getChartData() {

        Chart chart = new Chart();
        chart.setId(123456789L);
        String chartData = chartService.getChartData(chart);
        System.out.println(chartData);

    }