Merge branch 'master' into develop

master
eason.qian 7 years ago
commit 2d828c0255

@ -444,8 +444,8 @@ public class RetailAppServiceImp implements RetailAppService {
date_query.setClient_ids((String[]) params.get("client_ids")); date_query.setClient_ids((String[]) params.get("client_ids"));
} }
JSONObject date_params = date_query.toParams(query.getTimezone()); JSONObject date_params = date_query.toParams(query.getTimezone());
date_params.put("begin",date_params.getDate("from")); date_params.put("begin", date_params.getDate("from"));
date_params.put("end",date_params.getDate("to")); date_params.put("end", date_params.getDate("to"));
date_params.put("client_id", device.getIntValue("client_id")); date_params.put("client_id", device.getIntValue("client_id"));
JSONObject analysis = transactionAnalysisMapper.getClientTransaction(date_params); JSONObject analysis = transactionAnalysisMapper.getClientTransaction(date_params);
order.put("date_total", analysis); order.put("date_total", analysis);
@ -627,9 +627,12 @@ public class RetailAppServiceImp implements RetailAppService {
@Override @Override
public void sendNoticeMessage(final NoticeInfo notice, final String[] client_monikers) { public void sendNoticeMessage(final NoticeInfo notice, final String[] client_monikers) {
sendingAppleMsgPool.execute(() -> { for (String clientMoniker : client_monikers) {
for (String clientMoniker : client_monikers) { JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker);
JSONObject client = clientManager.getClientInfoByMoniker(clientMoniker); if(client==null){
continue;
}
sendingAppleMsgPool.execute(() -> {
List<JSONObject> tokens = clientDeviceTokenMapper.listAllTokensByClient_id(client.getIntValue("client_id")); List<JSONObject> tokens = clientDeviceTokenMapper.listAllTokensByClient_id(client.getIntValue("client_id"));
if (tokens != null && tokens.size() > 0) { if (tokens != null && tokens.size() > 0) {
for (JSONObject devToken : tokens) { for (JSONObject devToken : tokens) {
@ -667,8 +670,8 @@ public class RetailAppServiceImp implements RetailAppService {
} }
} }
} }
} });
}); }
} }
@Override @Override

Loading…
Cancel
Save