From 9977d6f2199c7261a79a903a069d09080126349f Mon Sep 17 00:00:00 2001 From: Yixian Date: Mon, 7 Feb 2022 14:30:06 +0800 Subject: [PATCH] 2.4.5: citypartner prize spell fix --- .../core/impls/CityPartnerPrizeServiceImpl.java | 14 +++++++------- .../payment/manage/dev/web/TestController.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java index a239ef6d7..b561602d0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/citypartner/core/impls/CityPartnerPrizeServiceImpl.java @@ -572,13 +572,13 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { jsonAps.put("create_time", new Date()); amountByChannel.add(jsonAps); } - if (!payType.getKey()) { + if (Boolean.FALSE.equals(payType.getKey())) { for (JSONObject params : payType.getValue()) { BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount"); BigDecimal channelRate = null; if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) { if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) { - channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); + channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipay_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } else { channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } @@ -663,7 +663,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { BigDecimal channelRate = null; if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) { if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) { - channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); + channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipay_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } else { channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } @@ -736,7 +736,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) { AlipayConfig.BizType bizType = AlipayPlusRuleManager.getRules().determineAmsBizType(TradeType.fromGatewayNumber(params.getInteger("gateway"))); if (bizType == AlipayConfig.BizType.RETAIL) { - channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); + channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipay_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } else { channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } @@ -833,7 +833,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { BigDecimal channelRate = BigDecimal.ZERO; if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) { if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) { - channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); + channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipay_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } else { channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } @@ -926,7 +926,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { BigDecimal channelRate = BigDecimal.ZERO; if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) { if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) { - channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); + channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipay_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } else { channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } @@ -1064,7 +1064,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { BigDecimal channelRate; if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) { if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) { - channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); + channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipay_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } else { channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); } diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java index 70ec27010..93257c9fd 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java @@ -382,7 +382,7 @@ public class TestController { } @GetMapping("/alipay/doclear/{date}") - public void doAliapyClear(@PathVariable String date) throws Exception { + public void doAlipayClear(@PathVariable String date) throws Exception { platformClearService.verifySettleLogByDate(date, date, "Alipay"); }