|
@@ -61,10 +61,9 @@ public class WithdrawApplyScheduleService {
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0 10 * * ?")
|
|
@Scheduled(cron = "0 0 10 * * ?")
|
|
|
@RedisLock(value = "'scheduleCheckBalance'", expire = 1, unit = TimeUnit.HOURS)
|
|
@RedisLock(value = "'scheduleCheckBalance'", expire = 1, unit = TimeUnit.HOURS)
|
|
|
- public void scheduleCheckBalance() throws ExecutionException, InterruptedException {
|
|
|
|
|
|
|
+ public void scheduleCheckBalance() {
|
|
|
if (DateTimeUtils.isWorkDay(LocalDate.now())) {
|
|
if (DateTimeUtils.isWorkDay(LocalDate.now())) {
|
|
|
String phone = sysConfigService.getString("finance_phone");
|
|
String phone = sysConfigService.getString("finance_phone");
|
|
|
- withdrawApplyService.approveAll();
|
|
|
|
|
BigDecimal balance = sandPayService.balance();
|
|
BigDecimal balance = sandPayService.balance();
|
|
|
BigDecimal total = withdrawApplyRepo.findByCreatedAtBeforeAndStatus(LocalDate.now().atStartOfDay(),
|
|
BigDecimal total = withdrawApplyRepo.findByCreatedAtBeforeAndStatus(LocalDate.now().atStartOfDay(),
|
|
|
WithdrawStatus.PENDING).stream().reduce(BigDecimal.ZERO, (a, b) -> a.add(b.getAmount()), BigDecimal::add);
|
|
WithdrawStatus.PENDING).stream().reduce(BigDecimal.ZERO, (a, b) -> a.add(b.getAmount()), BigDecimal::add);
|