1
0

ExcelServiceImpl.java 647 B

12345678910111213141516171819202122232425
  1. package com.seecoder.BlueWhale.serviceImpl;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.http.ResponseEntity;
  4. import org.springframework.stereotype.Service;
  5. import com.seecoder.BlueWhale.service.ExcelService;
  6. import com.seecoder.BlueWhale.service.OrderService;
  7. import com.seecoder.BlueWhale.util.ExcelUtil;
  8. @Service
  9. public class ExcelServiceImpl implements ExcelService{
  10. @Autowired
  11. ExcelUtil excelUtil;
  12. @Autowired
  13. OrderService orderService;
  14. @Override
  15. public ResponseEntity<byte[]> export() {
  16. return excelUtil.exportExcel(orderService.getAllOrders());
  17. }
  18. }