diff --git a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java index 5d0b357b1..75f774d57 100644 --- a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/ClientContractServiceImpl.java @@ -156,6 +156,14 @@ public class ClientContractServiceImpl implements ClientContractService { if (client == null) { throw new NotFoundException("merchant not found please check ID"); } + JSONObject sysconfig = sysConfigManager.getSysConfig(); + JSONObject defaultResult = new JSONObject(); + defaultResult.put("rate_expire", false); + defaultResult.put("rate_waring", false); + defaultResult.put("old_contract",false); + if (sysconfig!=null && !sysconfig.getBoolean("sys_new_contract_on")) { + return defaultResult; + } List rateInfo = clientRateMapper.minExpiryTime(client_id, null); JSONObject result = new JSONObject(); if (CollectionUtils.isEmpty(rateInfo)) {