From b2fca795d021214c9e80b20e58ace4aecb899a4c Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Fri, 9 Mar 2018 14:58:13 +0800 Subject: [PATCH] fix --- .../appclient/core/impls/RetailAppServiceImp.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 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 71772cc09..ec009a72a 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 @@ -418,13 +418,17 @@ public class RetailAppServiceImp implements RetailAppService { switch (order.getString("channel")) { case "Alipay": JSONObject alipayUser = customerRelationAlipayMapper.findCustomerByUserId(customer_id); - order.put("nickname", alipayUser.getString("nickname")); - order.put("headimg", alipayUser.getString("headimg")); + if (alipayUser!=null){ + order.put("nickname", alipayUser.getString("nickname")); + order.put("headimg", alipayUser.getString("headimg")); + } break; case "Wechat": JSONObject weUser = customerMapper.findCustomerByOpenId(customer_id); - order.put("nickname", weUser.getString("nickname")); - order.put("headimg", weUser.getString("headimg")); + if (weUser!=null){ + order.put("nickname", weUser.getString("nickname")); + order.put("headimg", weUser.getString("headimg")); + } break; default: break;