|
|
@@ -81,9 +81,12 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
LocalDate localNow = instant.atZone(zoneId).toLocalDate();
|
|
|
int startResult = localNow.compareTo(lifeDiscountCoupon.getBeginGetDate());
|
|
|
int endResult = localNow.compareTo(lifeDiscountCoupon.getEndGetDate());
|
|
|
- if (startResult < 0 || endResult > 0) {
|
|
|
+ if ((lifeDiscountCouponDto.getCouponStatus() != null && lifeDiscountCouponDto.getCouponStatus() == 0) || (startResult < 0 || endResult > 0)) {
|
|
|
lifeDiscountCoupon.setGetStatus(0);
|
|
|
+ } else {
|
|
|
+ lifeDiscountCoupon.setGetStatus(1);
|
|
|
}
|
|
|
+
|
|
|
lifeDiscountCouponMapper.insert(lifeDiscountCoupon);
|
|
|
//发布优惠券规则信息
|
|
|
//周中规则保存
|
|
|
@@ -150,7 +153,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
LocalDate localNow = instant.atZone(zoneId).toLocalDate();
|
|
|
int startResult = localNow.compareTo(lifeDiscountCoupon.getBeginGetDate());
|
|
|
int endResult = localNow.compareTo(lifeDiscountCoupon.getEndGetDate());
|
|
|
- if (startResult < 0 || endResult > 0) {
|
|
|
+ if ((lifeDiscountCouponDto.getCouponStatus() != null && lifeDiscountCouponDto.getCouponStatus() == 0) || (startResult < 0 || endResult > 0)) {
|
|
|
lifeDiscountCoupon.setGetStatus(0);
|
|
|
} else {
|
|
|
lifeDiscountCoupon.setGetStatus(1);
|