处理空指针

This commit is contained in:
2025-10-29 23:04:23 +08:00
parent 1909bc45f1
commit dc89816a10

View File

@ -128,12 +128,14 @@ public class GroupBuyCouponServiceImpl implements GroupBuyCouponService {
response.getData().getCertificates().forEach(certificate -> { response.getData().getCertificates().forEach(certificate -> {
productIdMap.put("dyOrderId",String.valueOf(certificate.getCertificateId())); productIdMap.put("dyOrderId",String.valueOf(certificate.getCertificateId()));
productIdMap.put("dyProductId", String.valueOf(certificate.getSku().getSkuId())); productIdMap.put("dyProductId", String.valueOf(certificate.getSku().getSkuId()));
if( certificate.getReserveInfo().getOrderReserveUserInfoList().size()>0){
certificate.getReserveInfo().getOrderReserveUserInfoList().forEach(orderReserveUserInfo -> { certificate.getReserveInfo().getOrderReserveUserInfoList().forEach(orderReserveUserInfo -> {
String phoneNumber = orderReserveUserInfo.getPhone(); String phoneNumber = orderReserveUserInfo.getPhone();
if (phoneNumber != null) { if (phoneNumber != null) {
phone.set(phoneNumber); phone.set(phoneNumber);
} }
}); });
}
}); });
String finalPhone = phone.get(); String finalPhone = phone.get();