Commit afd746c7 by peterchu

fix:设置下载销售明细报表时若获取不到数据时返回204

parent 83f31ceb
......@@ -45,6 +45,10 @@ public class StatementController {
*/
@RequestMapping(value = "salesDetail/downloadSalesDetailReport", method = RequestMethod.POST)
public NoteResult saleDetailReportFromAutoSource(@RequestBody String requestBody, HttpServletResponse response){
NoteResult noteResult = saleDetailService.downloadSalesDetailReportExcel(requestBody, response);
if (noteResult.getStatus() != 200 ){
response.setStatus(204);
}
return saleDetailService.downloadSalesDetailReportExcel(requestBody, response);
}
......
......@@ -112,9 +112,9 @@ public class SaleDetailService implements CommandLineRunner {
public NoteResult downloadSalesDetailReportExcel(String requestBody, HttpServletResponse response){
NoteResult noteResult = new NoteResult();
System.out.println(requestBody);
if (StringUtils.isBlank(requestBody)) {
noteResult.setStatus(300);
noteResult.setMsg("参数不能为空 [requestBody]");
return noteResult;
......
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