|
@@ -314,11 +314,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- @Async("threadPoolTaskExecutor")
|
|
|
|
|
|
+ @Async
|
|
public void syncOrder(Long taskId,OrderRequest orderRequest){
|
|
public void syncOrder(Long taskId,OrderRequest orderRequest){
|
|
Workbook workbook = null;
|
|
Workbook workbook = null;
|
|
try {
|
|
try {
|
|
- Thread.sleep(1000);
|
|
|
|
ExportParams params = new ExportParams(null, "订单详情");
|
|
ExportParams params = new ExportParams(null, "订单详情");
|
|
workbook = ExcelExportUtil.exportBigExcel(params, OrderExport.class,
|
|
workbook = ExcelExportUtil.exportBigExcel(params, OrderExport.class,
|
|
(o, i) -> {
|
|
(o, i) -> {
|
|
@@ -334,6 +333,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
} else {
|
|
} else {
|
|
sysAsyncTaskService.sendResult(taskId, false, "订单表格数据为空", AsyncResultType.TEXT);
|
|
sysAsyncTaskService.sendResult(taskId, false, "订单表格数据为空", AsyncResultType.TEXT);
|
|
}
|
|
}
|
|
|
|
+ log.info("订单详情导出完成");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("导出文件失败", e);
|
|
log.error("导出文件失败", e);
|
|
sysAsyncTaskService.sendResult(taskId, false, "导出订单文件失败", AsyncResultType.TEXT);
|
|
sysAsyncTaskService.sendResult(taskId, false, "导出订单文件失败", AsyncResultType.TEXT);
|
|
@@ -432,11 +432,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
((OrderServiceImpl) AopContext.currentProxy()).syncOrderBusiness(taskId,startTime,endTime,type);
|
|
((OrderServiceImpl) AopContext.currentProxy()).syncOrderBusiness(taskId,startTime,endTime,type);
|
|
return String.valueOf(taskId);
|
|
return String.valueOf(taskId);
|
|
}
|
|
}
|
|
- @Async("threadPoolTaskExecutor")
|
|
|
|
|
|
+ @Async
|
|
public void syncOrderBusiness(Long taskId,Date startTime, Date endTime, Integer type){
|
|
public void syncOrderBusiness(Long taskId,Date startTime, Date endTime, Integer type){
|
|
Workbook workbook = null;
|
|
Workbook workbook = null;
|
|
try {
|
|
try {
|
|
- Thread.sleep(1000);
|
|
|
|
ExportParams params = new ExportParams(null, "订单报表");
|
|
ExportParams params = new ExportParams(null, "订单报表");
|
|
workbook = ExcelExportUtil.exportBigExcel(params, OrderReport.class,
|
|
workbook = ExcelExportUtil.exportBigExcel(params, OrderReport.class,
|
|
(o, i) -> {
|
|
(o, i) -> {
|