From d3f35457b2536958505c5f3d1c50fb6fe10ad2fc Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Fri, 16 Mar 2018 10:12:42 +0800 Subject: [PATCH] fixbug --- .../manage/mappers/system/ClientRateMapper.java | 2 ++ .../merchants/core/impls/ClientManagerImpl.java | 2 +- .../manage/mappers/system/ClientRateMapper.xml | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.java index 321fd8a37..0d8fc72d2 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.java @@ -38,4 +38,6 @@ public interface ClientRateMapper { @Param("clean_days") Integer cleanDays, @Param("rate_name") String rateName); List minExpiryTime(@Param("client_id")int client_id,@Param("rate_name") String rate_name); + + List latestConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name); } 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 225b26c5c..922a4c43d 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 @@ -1903,7 +1903,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid client.put("company_name_acn", client.getString("company_name") + " (ABN " + client.getString("abn") + ")"); } - List clientRate = clientRateMapper.minExpiryTime(client.getIntValue("client_id"), null); + List clientRate = clientRateMapper.latestConfig(client.getIntValue("client_id"), null); if (CollectionUtils.isEmpty(clientRate)) { throw new BadRequestException("The Partner's Rate is not config!"); } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml index e471d54b3..fd93ed287 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml @@ -100,4 +100,16 @@ order by expiry_time desc + + \ No newline at end of file