From ab7829e9d56145689a3c12636cdd81b69867b6e8 Mon Sep 17 00:00:00 2001 From: luoyang Date: Mon, 2 Mar 2020 10:55:08 +0800 Subject: [PATCH] add app not found test --- pom.xml | 2 +- .../manage/appclient/core/impls/RetailRSvcServiceImpl.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3fc2220f7..7593d2f8e 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.3.76 + 1.3.77 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java index 14bea82e8..915f51ffe 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java @@ -11,6 +11,7 @@ import au.com.royalpay.payment.tools.codec.AESCrypt; import au.com.royalpay.payment.tools.device.DeviceSupport; import au.com.royalpay.payment.tools.encryptalgorithm.SignUtils; import au.com.royalpay.payment.tools.exceptions.BadRequestException; +import au.com.royalpay.payment.tools.exceptions.NotFoundException; import au.com.royalpay.payment.tools.mappers.CommonIncrementalChannelMapper; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -44,6 +45,9 @@ public class RetailRSvcServiceImpl implements RetailRSvcService { @Override public JSONObject findMchInfoBySourceCode(JSONObject device, String sourceCode) { + if (device.getString("version").equals("2.12.13") || device.getIntValue("client_id") == 9) { + throw new NotFoundException(); + } String clientType = device.getString("client_type"); deviceSupport.findRegister(clientType); JSONObject svcInfo = commonIncrementalChannelMapper.findIncreamentalChannelBySourceCode(sourceCode);