Commit 86996197 by 缪晖

NPE repaired

parent 379634e9
......@@ -560,14 +560,14 @@ public class CheckOrder {
if (Objects.equals(getCouponDetailResponseDto, null) || CollectionUtils.isEmpty(getCouponDetailResponseDto.getDetails())
|| getCouponDetailResponseDto.getDetails().get(0).getActive() == null
|| getCouponDetailResponseDto.getDetails().get(0).getActive().getActiveCode() == null) {
if ((CollectionUtils.isNotEmpty(getCouponDetailResponseDto.getDetails().get(0).getActiveRestrictionVOS())
&& CollectionUtils.isEmpty(getCouponDetailResponseDto.getDetails().get(0).getActiveRestrictionVOS().stream()
.filter(a -> Objects.equals(a.getStoreIdPartner(), createOrderVo.getShopId())).collect(Collectors.toList()))
)) {
throw new ServiceException(ResponseResult.COUPON_SHOP_NOTSUPPORT);
} else {
throw new ServiceException(ResponseResult.COUPON_GETINFO_INVAILD);
}
// 返回信息为空
throw new ServiceException(ResponseResult.COUPON_GETINFO_INVAILD);
} else if ((CollectionUtils.isNotEmpty(getCouponDetailResponseDto.getDetails().get(0).getActiveRestrictionVOS())
&& CollectionUtils.isEmpty(getCouponDetailResponseDto.getDetails().get(0).getActiveRestrictionVOS().stream()
.filter(a -> Objects.equals(a.getStoreIdPartner(), createOrderVo.getShopId())).collect(Collectors.toList()))
)) {
// 当前门店不可用
throw new ServiceException(ResponseResult.COUPON_SHOP_NOTSUPPORT);
}
List<GetCouponDetailResponseDto.ActiveRedeemTimeInterval> activeRedeemTimeIntervalList = getCouponDetailResponseDto.getDetails().get(0).getActiveRedeemTimeIntervalList();
checkCouonRedeemTime(activeRedeemTimeIntervalList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment