Authored by tanling

fixbugs

@@ -116,7 +116,7 @@ public class CouponServiceImpl implements ICouponService { @@ -116,7 +116,7 @@ public class CouponServiceImpl implements ICouponService {
116 // 有效期 116 // 有效期
117 Range<Integer> validityRange = null; 117 Range<Integer> validityRange = null;
118 118
119 - if (validityDay != null){ 119 + if (validityDay != null && validityDay!=0){
120 Integer now = DateUtil.getCurrentTimeSecond(); 120 Integer now = DateUtil.getCurrentTimeSecond();
121 Integer end = (int) LocalDateTime.of(LocalDate.now().plusDays(validityDay), LocalTime.MAX).toEpochSecond(ZoneOffset.of("+8")); 121 Integer end = (int) LocalDateTime.of(LocalDate.now().plusDays(validityDay), LocalTime.MAX).toEpochSecond(ZoneOffset.of("+8"));
122 validityRange = Range.open(now, end); 122 validityRange = Range.open(now, end);