From 891624e8c07fcb644217f9df6db69bb953268e90 Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Thu, 27 Jul 2023 08:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=8C=A1=E6=9D=BF=EF=BC=8C8?= =?UTF-8?q?=E6=9C=881=E5=8F=B7=E4=B9=8B=E5=90=8E=E7=9A=84=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=8C=89=E7=85=A7=E5=AE=9E=E9=99=85=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E5=88=86=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/OrderBasicInfoServiceImpl.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index b530ad31f..b043f5a9b 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -897,6 +897,16 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { if (CollectionUtils.isEmpty(orderBasicInfos)) { continue; } + + // 设置挡板,8月1号之后的订单按照实际进行分账 + LocalDateTime now = LocalDateTime.now(); + LocalDateTime dateTime = LocalDateTime.of(2023, 8, 2, 0, 0, 0); + if (now.isBefore(dateTime)) { + logger.info("当前时间:{}早于:{}, 此订单不进行分账处理, 订单信息:{}", DateUtils.formatDateTime(now), DateUtils.formatDateTime(dateTime), JSON.toJSONString(orderBasicInfos)); + return; + } + + // 执行分账 orderBasicInfos.parallelStream().forEach(x -> { try { doPaymentConfirm(x, adapayMemberAccount); @@ -915,13 +925,6 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { */ @Override public void doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException { - LocalDateTime now = LocalDateTime.now(); - LocalDateTime dateTime = LocalDateTime.of(2023, 8, 1, 0, 0, 0); - if (now.isBefore(dateTime)) { - logger.info("当前时间:{}早于:{}, 此订单不进行分账处理, 订单信息:{}", DateUtils.formatDateTime(now), DateUtils.formatDateTime(dateTime), JSON.toJSONString(orderBasicInfo)); - return; - } - // 查询订单的交易id AdapayCallbackRecord adapayCallbackRecord = adapayCallbackRecordService.selectByOrderCode(orderBasicInfo.getOrderCode()); if (adapayCallbackRecord == null) {