fix nullpointer error

master
yixian 8 years ago
parent 347e63152f
commit 8cf06cdfce

@ -387,6 +387,7 @@ public class TradeLogServiceImpl implements TradeLogService {
} }
JSONObject customer = new JSONObject(); JSONObject customer = new JSONObject();
if (order.getString("customer_id") != null) {
if (order.getString("customer_id").startsWith("olH")) { if (order.getString("customer_id").startsWith("olH")) {
customer = customerMapper.findCustomerGlobalpayByOpenId(order.getString("customer_id")); customer = customerMapper.findCustomerGlobalpayByOpenId(order.getString("customer_id"));
} else { } else {
@ -396,6 +397,7 @@ public class TradeLogServiceImpl implements TradeLogService {
order.put("headimg", customer.getString("headimg")); order.put("headimg", customer.getString("headimg"));
order.put("nickname", customer.getString("nickname")); order.put("nickname", customer.getString("nickname"));
} }
}
JSONObject customerAlipay = managerCustomerRelationAlipayMapper.findCustomerByUserId(order.getString("customer_id")); JSONObject customerAlipay = managerCustomerRelationAlipayMapper.findCustomerByUserId(order.getString("customer_id"));
if (customerAlipay != null) { if (customerAlipay != null) {

Loading…
Cancel
Save