1、Integer
if(Optional.ofNullable(order.getLevelId()).orElse(0)!=0){} //orElse(0)为重设的默认值

2、String
if (!Objects.equals(order.getCouponId(),null)){}