Commit 5638aa78 authored by Quxl's avatar Quxl

x

parent 8191eb5c
...@@ -15,8 +15,10 @@ import org.slf4j.LoggerFactory; ...@@ -15,8 +15,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.mvc.condition.PatternsRequestCondition; import org.springframework.web.servlet.mvc.condition.PatternsRequestCondition;
...@@ -193,10 +195,9 @@ public class WebUtilController { ...@@ -193,10 +195,9 @@ public class WebUtilController {
} }
@Transactional @Transactional
@PostMapping("exportExcel") @GetMapping("exportExcel")
@ApiOperation("导出Excel") @ApiOperation("导出Excel")
public void exportExcel(HttpServletResponse response) throws IOException { public void exportExcel(HttpServletResponse response) throws IOException {
this.verifyAuth();
response.setHeader("content-type", "application/octet-stream"); response.setHeader("content-type", "application/octet-stream");
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("影片列表 [" + DateUtil.format(new Date(), "yyMMdd_HHmmss") + "].xls", "UTF-8")); response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("影片列表 [" + DateUtil.format(new Date(), "yyMMdd_HHmmss") + "].xls", "UTF-8"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment