修改导出时既返回流又返回json数据导致后台异常的问题

This commit is contained in:
qiankunpingtai
2019-05-06 16:25:11 +08:00
parent 2fe10c756e
commit 1841c1f665
2 changed files with 2 additions and 7 deletions

View File

@@ -660,7 +660,7 @@ public class DepotItemController {
* @return * @return
*/ */
@GetMapping(value = "/exportExcel") @GetMapping(value = "/exportExcel")
public BaseResponseInfo exportExcel(@RequestParam("currentPage") Integer currentPage, public void exportExcel(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize, @RequestParam("pageSize") Integer pageSize,
@RequestParam("projectId") Integer projectId, @RequestParam("projectId") Integer projectId,
@RequestParam("monthTime") String monthTime, @RequestParam("monthTime") String monthTime,
@@ -717,10 +717,6 @@ public class DepotItemController {
message = "导出失败"; message = "导出失败";
res.code = 500; res.code = 500;
} }
/**
* 2019-01-15response已经返回finally部分完全没必要
* */
return res;
} }
/** /**

View File

@@ -199,7 +199,7 @@ public class MaterialController {
* @return * @return
*/ */
@GetMapping(value = "/exportExcel") @GetMapping(value = "/exportExcel")
public BaseResponseInfo exportExcel(@RequestParam("name") String name, public void exportExcel(@RequestParam("name") String name,
@RequestParam("model") String model, @RequestParam("model") String model,
@RequestParam("categoryId") Long categoryId, @RequestParam("categoryId") Long categoryId,
@RequestParam("categoryIds") String categoryIds, @RequestParam("categoryIds") String categoryIds,
@@ -240,7 +240,6 @@ public class MaterialController {
map.put("message", message); map.put("message", message);
res.data = map; res.data = map;
} }
return res;
} }
/** /**