From cfb3070c49bd19290ce22d466bc6a5fe57b5931c Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Mon, 5 Mar 2018 11:56:26 +0800 Subject: [PATCH] fix --- .../core/impls/RetailAppServiceImp.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 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 efeb6d09a..b9fffdcff 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 @@ -444,8 +444,8 @@ public class RetailAppServiceImp implements RetailAppService { date_query.setClient_ids((String[]) params.get("client_ids")); } JSONObject date_params = date_query.toParams(query.getTimezone()); - date_params.put("begin",date_params.getDate("from")); - date_params.put("end",date_params.getDate("to")); + date_params.put("begin", date_params.getDate("from")); + date_params.put("end", date_params.getDate("to")); date_params.put("client_id", device.getIntValue("client_id")); JSONObject analysis = transactionAnalysisMapper.getClientTransaction(date_params); order.put("date_total", analysis); @@ -627,9 +627,12 @@ public class RetailAppServiceImp implements RetailAppService { @Override public void sendNoticeMessage(final NoticeInfo notice, final String[] client_monikers) { - sendingAppleMsgPool.execute(() -> { - for (String clientMoniker : client_monikers) { - JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); + for (String clientMoniker : client_monikers) { + JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); + if(client==null){ + continue; + } + sendingAppleMsgPool.execute(() -> { List tokens = clientDeviceTokenMapper.listAllTokensByClient_id(client.getIntValue("client_id")); if (tokens != null && tokens.size() > 0) { for (JSONObject devToken : tokens) { @@ -667,8 +670,8 @@ public class RetailAppServiceImp implements RetailAppService { } } } - } - }); + }); + } } @Override