瀏覽代碼

领取状态修改,根据开始和结束领取时间判断。

zhangchen 15 小時之前
父節點
當前提交
ce01d74c5e

+ 5 - 5
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponServiceImpl.java

@@ -637,9 +637,9 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
             //如果根据类型查询
             //如果根据类型查询
             if (!StringUtils.isEmpty(tab) && tab.equals("1")) {//进行中
             if (!StringUtils.isEmpty(tab) && tab.equals("1")) {//进行中
                 //开始时间小于当前时间
                 //开始时间小于当前时间
-                lifeDiscountCouponLambdaQueryWrapper.le(LifeDiscountCoupon::getStartDate, getPureDate(now));
+                lifeDiscountCouponLambdaQueryWrapper.le(LifeDiscountCoupon::getBeginGetDate, getPureDate(now));
                 //结束时间大于当前时间
                 //结束时间大于当前时间
-                lifeDiscountCouponLambdaQueryWrapper.ge(LifeDiscountCoupon::getEndDate, getPureDate(now));
+                lifeDiscountCouponLambdaQueryWrapper.ge(LifeDiscountCoupon::getEndGetDate, getPureDate(now));
 
 
                 //不要已暂停关闭领取的
                 //不要已暂停关闭领取的
                 lifeDiscountCouponLambdaQueryWrapper.eq(LifeDiscountCoupon::getGetStatus, 1);
                 lifeDiscountCouponLambdaQueryWrapper.eq(LifeDiscountCoupon::getGetStatus, 1);
@@ -662,8 +662,8 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
                 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 (lifeDiscountCoupon.getSingleQty() == 0) {//无库存则已售罄
                 if (lifeDiscountCoupon.getSingleQty() == 0) {//无库存则已售罄
                     lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.HAVE_SOLD_OUT.getValue()));
                     lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.HAVE_SOLD_OUT.getValue()));
@@ -788,7 +788,7 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
             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 startResult = localNow.compareTo(lifeDiscountCoupon.getStartDate());
-            int endResult = localNow.compareTo(lifeDiscountCoupon.getEndDate());
+            int endResult = localNow.compareTo(lifeDiscountCoupon.getEndGetDate());
             //如果当前时间小于开始时间
             //如果当前时间小于开始时间
             if (lifeDiscountCoupon.getGetStatus().toString().equals(DiscountCouponEnum.NO_GET.getValue())) {
             if (lifeDiscountCoupon.getGetStatus().toString().equals(DiscountCouponEnum.NO_GET.getValue())) {
                 lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.SUSPEND_GET.getValue()));
                 lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.SUSPEND_GET.getValue()));