From 14a05b90f63a9059a822b658b3c1cf782d95932c Mon Sep 17 00:00:00 2001 From: dulingling Date: Thu, 6 Aug 2020 11:27:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=95=86=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=95=B0=E6=8D=AE=E5=BC=82=E5=B8=B8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../core/impls/CityPartnerPrizeServiceImpl.java | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index d79e05eec..2b0065cdc 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.55 + 2.3.56 UTF-8 2.4.0 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 581cce80b..0f4af53bc 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 @@ -455,11 +455,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { .subtract(params.getBigDecimal("transaction_fee")); //增加货币判断 int i = currencyScale(params.getString("clearing_currency")); - total = total.add(tmpClearingAmount); - total_surage = total_surage.add(tmpTotalSurcharge).setScale(i, RoundingMode.HALF_UP); royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP)); - net_surage = net_surage.add(params.getBigDecimal("channel_surcharge")); - transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee")); //rpaypmt_overseas_card channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("rpaypmt_overseas_card" + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); @@ -615,13 +611,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService { dateto = params.getDate("transaction_time"); } } - - total = total.add(tmpClearingAmount); - total_surage = total_surage.add(tmpTotalSurcharge).setScale(i, RoundingMode.HALF_UP); royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP)); - net_surage = net_surage.add(params.getBigDecimal("channel_surcharge")); - transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee")); - //rpaypmt_overseas_card channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal( "rpaypmt_overseas_card_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")); From fded1b982d55186387eb0b56bcbd8812255a6b5d Mon Sep 17 00:00:00 2001 From: dulingling Date: Mon, 10 Aug 2020 15:50:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?upd:=E4=BB=A3=E7=90=86=E5=95=86=E6=8F=90?= =?UTF-8?q?=E6=88=90sql=E8=B0=83=E6=95=B4=EF=BC=8C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=BA=E8=B4=9F=E6=95=B0=EF=BC=8Csql=E8=BD=AC=E5=90=8E?= =?UTF-8?q?=E5=8F=98=E4=B8=BA=E6=AD=A3=E6=95=B0=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=AE=A1=E7=AE=97=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/mappers/payment/TransactionMapper.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 2b0065cdc..2f7647441 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.56 + 2.3.57 UTF-8 2.4.0 diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml index 242c3f775..256c10b7e 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml @@ -938,11 +938,11 @@ t.channel, t.surcharge_rate, t.transaction_time, - if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount, - if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge, - if(t.transaction_type = 'Credit', t.transaction_fee, -t.transaction_fee) transaction_fee, - if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge, - if(t.transaction_type = 'Credit', t.settle_amount, -t.settle_amount) settle_amount, + IF( t.transaction_type = 'Credit', t.clearing_amount,-(if(t.clearing_amount>=0,t.clearing_amount, - t.clearing_amount))) clearing_amount, + IF( t.transaction_type = 'Credit', t.total_surcharge, -(if(t.total_surcharge>=0,t.total_surcharge, - t.total_surcharge))) total_surcharge, + IF( t.transaction_type = 'Credit', t.transaction_fee, -(if(t.transaction_fee>=0,t.transaction_fee, - t.transaction_fee))) transaction_fee, + IF( t.transaction_type = 'Credit', t.channel_surcharge, - (if(t.channel_surcharge>=0,t.channel_surcharge, - t.channel_surcharge))) channel_surcharge, + IF( t.transaction_type = 'Credit', t.settle_amount, - (if(t.settle_amount>=0,t.settle_amount, - t.settle_amount)) ) settle_amount, t.order_id, t.org_rate, t.surcharge_cashback, From 5bed230f084022f8d8b1af22b56369d4fa1accc9 Mon Sep 17 00:00:00 2001 From: yixian Date: Mon, 10 Aug 2020 18:39:00 +1000 Subject: [PATCH 3/3] settle mail sending error logs --- .../management/clearing/core/impl/CleanServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java index c0cee2321..310aaacc6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java @@ -31,6 +31,7 @@ import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.exceptions.NotFoundException; +import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.locale.LocaleSupport; import au.com.royalpay.payment.tools.lock.Locker; import au.com.royalpay.payment.tools.merchants.beans.BalanceGroup; @@ -1469,9 +1470,11 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider } } } catch (IOException e) { - logger.error("生成excel字节数组发生错误"); + logger.error("生成excel字节数组发生错误", e); + throw new ServerErrorException("IOError", e); } catch (URISyntaxException e) { - logger.error("调用服务发送邮件时错误"); + logger.error("调用服务发送邮件时错误", e); + throw new ServerErrorException("IOError", e); } result.put("result", 0); result.put("msg", "已发送");