From b1458a18ec1ad5f086b706d8945a4ac12a5b2e56 Mon Sep 17 00:00:00 2001 From: ZZ Date: Thu, 18 Nov 2021 18:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E4=B8=89=E6=96=B9opid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notification/NotificationChargeOrderInfoTask.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/notification/NotificationChargeOrderInfoTask.java b/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/notification/NotificationChargeOrderInfoTask.java index 9226f8b2..871f03e6 100644 --- a/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/notification/NotificationChargeOrderInfoTask.java +++ b/evcs-modules/evcs-core/src/main/java/com/xhpc/evcs/notification/NotificationChargeOrderInfoTask.java @@ -49,9 +49,14 @@ public class NotificationChargeOrderInfoTask extends CoreDispatcher { if (authSecretToken.getOperatorId3irdpty().equals(operatorId3rdptyEvcs)) { ChargeOrderInfo chargeOrderInfo = new ChargeOrderInfo(horder); final ChargeOrderInfoResponse pushResp = notify(chargeOrderInfo, authSecretToken); - horder.setConfirmResult(pushResp.getConfirmResult()); - logger.info("3rd part order {} push result: {}", horder.getSerialNumber(), pushResp.getConfirmResult()); - xhpcHistoryOrderRepository.save(horder); + if (pushResp != null) { + horder.setConfirmResult(pushResp.getConfirmResult()); + logger.info("3rd part order {} push result: {}", horder.getSerialNumber(), pushResp.getConfirmResult()); + xhpcHistoryOrderRepository.save(horder); + } else { + logger.error("3dp[{}] order[{}/{}] push fail", operatorId3rdptyEvcs, + horder.getSerialNumber(), horder.getInternetSerialNumber()); + } } } }