From 05c485b4d5b92feb700db8298d4fa72820adb258 Mon Sep 17 00:00:00 2001 From: yixian Date: Mon, 4 Nov 2019 19:05:51 +0800 Subject: [PATCH] serverless trigger, add loggers --- .../manage/merchants/core/impls/ClientManagerImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 6e1885f6e..a5d3f99e0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -522,6 +522,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override public void exportClients(JSONObject manager, PartnerQuery query, HttpServletResponse resp) { JSONObject params = prepareListClientsParameter(manager, query); + logger.info("exporting_clients:--->{}", params); JSONObject retResp = serverlessFunctionTrigger.triggerFunction("export_merchants", params); String contentB64 = retResp.getString("content"); resp.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); @@ -3615,7 +3616,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid Date endDate = TimeZoneUtils.nextYearByCurrDay(); String end_date = DateFormatUtils.format(endDate, "dd/MM/yyyy"); client.put("end_date", end_date); - client.put("full_name", URLDecoder.decode(file.getOriginalFilename(),"UTF-8")); + client.put("full_name", URLDecoder.decode(file.getOriginalFilename(), "UTF-8")); BufferedImage img = ImageIO.read(file.getInputStream()); ByteArrayOutputStream out = new ByteArrayOutputStream(); ImageIO.write(img, "png", out); @@ -5293,12 +5294,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid throw new BadRequestException("The Partner's Bank Account is not config!"); } JSONObject representativeInfo = sysClientLegalPersonMapper.findRepresentativeInfo(client.getIntValue("client_id")); - for(String str:representativeInfo.keySet()){ - if(representativeInfo.getString(str) == null || !(representativeInfo.getString(str).length()>0)|| !(client.getString("contact_job")!=null && client.getString("contact_job").length()>0)) { + for (String str : representativeInfo.keySet()) { + if (representativeInfo.getString(str) == null || !(representativeInfo.getString(str).length() > 0) || !(client.getString("contact_job") != null && client.getString("contact_job").length() > 0)) { throw new BadRequestException("The LegalPersonInfo is not config!Please upgrade the RoyalPay App version"); } } - if ( !(StringUtils.isNotBlank(client.getString("client_pay_type"))) || !(StringUtils.isNotBlank(client.getString("client_pay_desc"))) ) { + if (!(StringUtils.isNotBlank(client.getString("client_pay_type"))) || !(StringUtils.isNotBlank(client.getString("client_pay_desc")))) { throw new BadRequestException("Merchant Payment Scenario is not config!"); }