|
|
@@ -27,6 +27,7 @@ import org.apache.poi.ss.usermodel.Sheet;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.apache.poi.ss.usermodel.WorkbookFactory;
|
|
|
import org.apache.poi.util.TempFile;
|
|
|
+import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.bind.annotation.RequestPart;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
@@ -134,6 +135,12 @@ public class UserBalanceService {
|
|
|
settleRecordRepo.save(new SettleRecord(date, orders.size(), totalAmount, royaltiesAmount, serviceChargeAmount));
|
|
|
}
|
|
|
|
|
|
+ @Async
|
|
|
+ @Transactional
|
|
|
+ public ExportWithdraw exportWithdrawAsync(String remark) throws IOException, InvalidFormatException {
|
|
|
+ return exportWithdraw(remark);
|
|
|
+ }
|
|
|
+
|
|
|
@Transactional
|
|
|
public ExportWithdraw exportWithdraw(String remark) throws IOException, InvalidFormatException {
|
|
|
List<UserBalance> balanceList = userBalanceRepo.findByBalanceGreaterThan(BigDecimal.ZERO);
|