|
@@ -74,14 +74,14 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
//发布优惠券表信息
|
|
//发布优惠券表信息
|
|
LifeDiscountCoupon lifeDiscountCoupon = new LifeDiscountCoupon();
|
|
LifeDiscountCoupon lifeDiscountCoupon = new LifeDiscountCoupon();
|
|
BeanUtils.copyProperties(lifeDiscountCouponDto, lifeDiscountCoupon);
|
|
BeanUtils.copyProperties(lifeDiscountCouponDto, lifeDiscountCoupon);
|
|
- // 根据开始时间判断可领取状态
|
|
|
|
|
|
+ // 根据开始领取时间判断可领取状态
|
|
// 判断是否在领取时间内
|
|
// 判断是否在领取时间内
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
Instant instant = now.toInstant();
|
|
Instant instant = now.toInstant();
|
|
ZoneId zoneId = ZoneId.systemDefault();
|
|
ZoneId zoneId = ZoneId.systemDefault();
|
|
LocalDate localNow = instant.atZone(zoneId).toLocalDate();
|
|
LocalDate localNow = instant.atZone(zoneId).toLocalDate();
|
|
- int startResult = localNow.compareTo(lifeDiscountCoupon.getStartDate());
|
|
|
|
- int endResult = localNow.compareTo(lifeDiscountCoupon.getEndDate());
|
|
|
|
|
|
+ int startResult = localNow.compareTo(lifeDiscountCoupon.getBeginGetDate());
|
|
|
|
+ int endResult = localNow.compareTo(lifeDiscountCoupon.getEndGetDate());
|
|
if (startResult < 0 || endResult > 0) {
|
|
if (startResult < 0 || endResult > 0) {
|
|
lifeDiscountCoupon.setGetStatus(0);
|
|
lifeDiscountCoupon.setGetStatus(0);
|
|
}
|
|
}
|