package com.hchyun.test.controller;

import com.hchyun.common.core.entity.AjaxResult;
import com.hchyun.test.MapExcelUtil;
import com.hchyun.test.dao.ResultsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author 18209
 * @Date 2021/1/29 17:36
 * @Version 1.0
 */
@RestController
@RequestMapping("/test")
public class Test {
    @Autowired
    private ResultsDao resultsDao;

    @GetMapping("/map")
    public AjaxResult mapTest(){
        MapExcelUtil util = new MapExcelUtil();
        return util.exportExcel(resultsDao.testMap(),"test");
    }
}
