From 3c8dd8319f2825b3994d4f4aa016da7adfb679d9 Mon Sep 17 00:00:00 2001 From: Yixian Date: Mon, 24 Jan 2022 11:44:10 +0800 Subject: [PATCH] 2.4.5: code format --- .../fund/core/impls/XPlanFundProcessorImpl.java | 2 +- .../payment/manage/tradelog/refund/RefundService.java | 2 ++ .../tradelog/refund/impls/RefundServiceImpl.java | 11 ++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/fund/core/impls/XPlanFundProcessorImpl.java b/src/main/java/au/com/royalpay/payment/manage/fund/core/impls/XPlanFundProcessorImpl.java index 236153f42..a638f06d1 100644 --- a/src/main/java/au/com/royalpay/payment/manage/fund/core/impls/XPlanFundProcessorImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/fund/core/impls/XPlanFundProcessorImpl.java @@ -399,10 +399,10 @@ public class XPlanFundProcessorImpl implements XPlanFundProcesor { private JSONObject getClient(String clientMoniker) { JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); - client.putAll(clientConfigService.find(client.getIntValue("client_id"))); if (client == null) { throw new InvalidShortIdException(); } + client.putAll(clientConfigService.find(client.getIntValue("client_id"))); return client; } diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/RefundService.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/RefundService.java index 34c68c90a..b31eb4c3d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/RefundService.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/RefundService.java @@ -25,6 +25,8 @@ public interface RefundService { boolean reviewNewRefundOrder(String orderId, BigDecimal fee, String remark, JSONObject account, JSONObject manager); + JSONObject cancelOrder(JSONObject partnerAccount, String orderId); + JSONObject newRefundOrder(String orderId, BigDecimal fee, boolean original, String remark, JSONObject partnerAccount, JSONObject manager); @Transactional diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java index 8f91bc885..41cdf081d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java @@ -154,7 +154,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish OperatorType type = account != null ? OperatorType.PARTNER : OperatorType.MANAGER; boolean requireAudit = type == OperatorType.PARTNER && PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER && clientConfig.getBooleanValue("enable_refund_auth"); - logger.debug("applyer type=" + type + "; require audit=" + requireAudit); + logger.debug("applyer type={}; require audit={}", type, requireAudit); paymentApi.clientRefundBalanceCheck(clientId, orderId, currency, feeAmount); Assert.notNull(order, "Order Not exists"); @@ -180,6 +180,11 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish } } + @Override + public JSONObject cancelOrder(JSONObject partnerAccount, String orderId) { + return null; + } + @Override public JSONObject newRefundOrder(String orderId, BigDecimal fee, boolean original, String remark, JSONObject partnerAccount, JSONObject manager) { JSONObject order = orderMapper.getOrderDetail(orderId); @@ -229,7 +234,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish } boolean requireAudit = type == OperatorType.PARTNER && PartnerRole.getRole(partnerAccount.getIntValue("role")) == PartnerRole.CASHIER && clientConfig.getBooleanValue("enable_refund_auth"); - logger.debug("applyer type={}; require audit={}",type, requireAudit); + logger.debug("applyer type={}; require audit={}", type, requireAudit); return paymentApi.refundOrder(null, orderId, null, amount, remark, operator, type, requireAudit); } @@ -439,7 +444,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish @Override public JSONObject listUnionAllApply(JSONObject params, PageBounds pagination) { - if(params.get("client_id")==null && params.get("client_ids")==null){ + if (params.get("client_id") == null && params.get("client_ids") == null) { return null; } return PageListUtils.buildPageListResult(refundMapper.listUnionAllApply(params, pagination));