From f4899470bd8966cb7eeb01d1d1401d4cbe1e7348 Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Tue, 26 Jun 2018 15:45:49 +0800 Subject: [PATCH] fix bug --- .../manage/appclient/core/impls/RetailAppServiceImp.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index 2295275b3..ca220dbaf 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -320,8 +320,6 @@ public class RetailAppServiceImp implements RetailAppService { String clientType = device.getString("client_type"); deviceSupport.findRegister(clientType); int client_id = device.getIntValue("client_id"); - JSONObject client = clientManager.getClientInfo(client_id); - device.put("client_moniker", client.getString("client_moniker")); TradeLogQuery tradeLogQuery = new TradeLogQuery(); tradeLogQuery.setDatefrom(appQueryBean.getBegin()); tradeLogQuery.setDateto(appQueryBean.getEnd()); @@ -329,6 +327,12 @@ public class RetailAppServiceImp implements RetailAppService { appQueryBean.setApp_client_ids(String.valueOf(client_id)); } tradeLogQuery.setClient_ids(appQueryBean.getApp_client_ids().split(",")); + JSONObject client = clientManager.getClientInfo(Integer.parseInt(tradeLogQuery.getClient_ids()[0])); + if(client==null){ + throw new NotFoundException("Client Not Exists"); + } + device.put("client_moniker", client.getString("client_moniker")); + device.put("client",client); tradeLogService.exportTransFlow(tradeLogQuery, device, httpResponse); }