@GetMapping("/findName")
public ResultVo findName() throws IOException {
List<Person> all =service.findByName();
//设置session值
request.getSession().setAttribute("personVo", all);
return all;
@GetMapping("/export")
public Object export(String data){
OutputStream output=null;
String fileName="";
byte[] bytes=null;
try {
HgDataVo list = getYearData(qoStartTime, qoEndTime, regionName, tp);
//获取session值,并获取之前读取的数据信息
if (request.getSession().getAttribute("personVo") != null) {
list = (HgDataVo) request.getSession().getAttribute(personVo);
} else {
return new ResultVo(RespConst.RespEnum.NULL, "会话过期,请重新查询!");
}