|
@@ -281,10 +281,10 @@ public class MercCouponFactoryBase extends ServiceImpl<MercCouponMapper, MercCou
|
|
|
}
|
|
|
//查询商户券
|
|
|
MercCoupon mercCoupon = getById(memberCouponJMap.getInt("couponId"));
|
|
|
- if (mercCoupon.getValidStartDate().isAfter(orderCreateTime.toLocalDate())) {
|
|
|
+ if (Emptys.check(mercCoupon.getValidStartDate()) && mercCoupon.getValidStartDate().isAfter(orderCreateTime.toLocalDate())) {
|
|
|
throw new BusinessException("该券于!" + mercCoupon.getValidStartDate().toString() + "开始使用!");
|
|
|
}
|
|
|
- if (mercCoupon.getValidEndDate().isBefore(orderCreateTime.toLocalDate())) {
|
|
|
+ if (Emptys.check(mercCoupon.getValidEndDate()) && mercCoupon.getValidEndDate().isBefore(orderCreateTime.toLocalDate())) {
|
|
|
throw new BusinessException("该券于!" + mercCoupon.getValidEndDate().toString() + "结束!");
|
|
|
}
|
|
|
//判断优惠券是可用于该设备
|