From da5db14d273200716df7f100f2d4d9b243cbd43c Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Mon, 28 Mar 2022 16:50:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E9=80=A0=E5=90=88=E5=90=8C=E6=97=B6tr?= =?UTF-8?q?ansaction=5Ffee=20*100=20(=E4=B9=8B=E5=89=8Dtransaction=5Ffee/1?= =?UTF-8?q?00)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/royalpay/payment/manage/dev/web/TestController.java | 5 +++-- .../manage/merchants/core/impls/ClientManagerImpl.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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 93257c9fd..4d7101b2e 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 @@ -69,6 +69,7 @@ import javax.validation.Valid; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; +import java.math.BigDecimal; import java.math.RoundingMode; import java.security.InvalidParameterException; import java.text.ParseException; @@ -259,12 +260,12 @@ public class TestController { JSONObject alipayApsCashierRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_CASHIER.getChannelCode()); if (alipayApsCashierRate != null) { client.put("aps_cashier_rate", alipayApsCashierRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)+"%"); - client.put("aps_cashier_service_rate", alipayApsCashierRate.getBigDecimal("transaction_fee").setScale(2, RoundingMode.DOWN)+"%"); + client.put("aps_cashier_service_rate", alipayApsCashierRate.getBigDecimal("transaction_fee").multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.DOWN)+"%"); } JSONObject alipayApsInstoreRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_IN_STORE.getChannelCode()); if (alipayApsInstoreRate != null) { client.put("aps_instore_rate", alipayApsInstoreRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN)+"%"); - client.put("aps_instore_service_rate",alipayApsInstoreRate.getBigDecimal("transaction_fee").setScale(2, RoundingMode.DOWN)+"%"); + client.put("aps_instore_service_rate",alipayApsInstoreRate.getBigDecimal("transaction_fee").multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.DOWN)+"%"); client.put("alipayplus_clean", alipayApsInstoreRate.getString("clean_days")); } } catch (Exception ignored) { diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 77a5fe602..538195a04 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -3135,12 +3135,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid JSONObject alipayApsCashierRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_CASHIER.getChannelCode()); if (alipayApsCashierRate != null) { client.put("aps_cashier_rate", alipayApsCashierRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN) + "%"); - client.put("aps_cashier_service_rate", alipayApsCashierRate.getBigDecimal("transaction_fee").setScale(2, RoundingMode.DOWN) + "%"); + client.put("aps_cashier_service_rate", alipayApsCashierRate.getBigDecimal("transaction_fee").multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.DOWN) + "%"); } JSONObject alipayApsInstoreRate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), PayChannel.ALIPAY_APS_IN_STORE.getChannelCode()); if (alipayApsInstoreRate != null) { client.put("aps_instore_rate", alipayApsInstoreRate.getBigDecimal("rate_value").setScale(2, RoundingMode.DOWN) + "%"); - client.put("aps_instore_service_rate", alipayApsInstoreRate.getBigDecimal("transaction_fee").setScale(2, RoundingMode.DOWN) + "%"); + client.put("aps_instore_service_rate", alipayApsInstoreRate.getBigDecimal("transaction_fee").multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.DOWN) + "%"); client.put("alipayplus_clean", alipayApsInstoreRate.getString("clean_days")); } } catch (Exception ignored) {