From 0c7afb545c22a3d93bc9b7e0edde14cd593ea557 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Feb 2020 11:07:15 +0800 Subject: [PATCH] fix transflow clientIds --- pom.xml | 2 +- .../tradelog/core/impls/TradeLogServiceImpl.java | 6 +++--- src/main/ui/static/payment/tradelog/transflow.js | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 8062490b2..5480bb2a8 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.3.41 + 1.3.43 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java index 1891adc9d..0fb1dbf76 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java @@ -730,7 +730,7 @@ public class TradeLogServiceImpl implements TradeLogService { public void exportExcel(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception { logger.debug("excel The method======= exportExcel() start......................."); JSONObject transFlow = listPartnerTransFlow(query, partner); - JSONObject client = clientManager.getClientInfo(Integer.parseInt(query.getClient_ids()[0])); + JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id")); if (!transFlow.getJSONArray("data").isEmpty()) { try { List dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class); @@ -815,7 +815,7 @@ public class TradeLogServiceImpl implements TradeLogService { public void exportExcelNew(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception { logger.debug("excel The method======= exportExcelNew() start......................."); JSONObject transFlow = listPartnerTransFlow(query, partner); - JSONObject client = clientManager.getClientInfo(Integer.parseInt(query.getClient_ids()[0])); + JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id")); if (!transFlow.getJSONArray("data").isEmpty()) { List dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class); try (HSSFWorkbook workbook = new HSSFWorkbook()) { @@ -1689,7 +1689,7 @@ public class TradeLogServiceImpl implements TradeLogService { String[] clientIds = query.getClient_ids(); List clientIdList = new ArrayList<>(); clientIdList.add("ALL"); - if (clientIds.length >= 2) { + if (clientIds!=null && clientIds.length >= 2) { clientIdList.addAll(Arrays.asList(clientIds)); } HSSFSheet sheet = null; diff --git a/src/main/ui/static/payment/tradelog/transflow.js b/src/main/ui/static/payment/tradelog/transflow.js index 246189708..964c67766 100644 --- a/src/main/ui/static/payment/tradelog/transflow.js +++ b/src/main/ui/static/payment/tradelog/transflow.js @@ -200,10 +200,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) { url += connectSymbol + 'dev_id=' + params.dev_id; connectSymbol = '&' } - params.client_ids.forEach(function (i) { - url += connectSymbol + 'client_ids=' + i; - connectSymbol = '&'; - }); + if (params.client_ids) { + params.client_ids.forEach(function (i) { + url += connectSymbol + 'client_ids=' + i; + connectSymbol = '&'; + }); + } if (params.datefrom) { params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd'); url += connectSymbol + 'datefrom=' + params.datefrom;