|
|
@@ -491,25 +491,29 @@ public class LifeDiscountCouponPlatformServiceImpl extends ServiceImpl<LifeDisco
|
|
|
int startResult = localNow.compareTo(lifeDiscountCoupon.getBeginGetDate());
|
|
|
int endResult = localNow.compareTo(lifeDiscountCoupon.getEndGetDate());
|
|
|
if (lifeDiscountCoupon.getCouponStatus() == 0) {
|
|
|
- //如果为草稿则状态为未开始
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.DRAFT.getValue()));
|
|
|
- } else if (lifeDiscountCoupon.getSingleQty() == null || lifeDiscountCoupon.getSingleQty() == 0) {//无库存则已售罄 //如果当前时间小于开始时间
|
|
|
+ lifeDiscountCouponVo.setStatusDesc("草稿");
|
|
|
+ } else if (lifeDiscountCoupon.getSingleQty() == null || lifeDiscountCoupon.getSingleQty() == 0) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.HAVE_SOLD_OUT.getValue()));
|
|
|
+ lifeDiscountCouponVo.setStatusDesc("已售罄");
|
|
|
} else if (startResult < 0) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.HAVE_NOT_STARTED.getValue()));
|
|
|
+ lifeDiscountCouponVo.setStatusDesc("未开始");
|
|
|
} else if (lifeDiscountCoupon.getGetStatus() == null || lifeDiscountCoupon.getGetStatus().toString().equals(DiscountCouponEnum.NO_GET.getValue())) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.SUSPEND_GET.getValue()));
|
|
|
+ lifeDiscountCouponVo.setStatusDesc("已暂停");
|
|
|
} else if (endResult > 0) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.FINISHED.getValue()));
|
|
|
+ lifeDiscountCouponVo.setStatusDesc("已结束");
|
|
|
} else if (startResult >= 0 && endResult <= 0) {
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.UNDER_WAY.getValue()));
|
|
|
+ lifeDiscountCouponVo.setStatusDesc("进行中");
|
|
|
}
|
|
|
} else {
|
|
|
if (lifeDiscountCoupon.getCouponStatus() == 0) {
|
|
|
- //如果为草稿则状态为未开始
|
|
|
lifeDiscountCouponVo.setStatus(Integer.parseInt(DiscountCouponEnum.DRAFT.getValue()));
|
|
|
+ lifeDiscountCouponVo.setStatusDesc("草稿");
|
|
|
} else {
|
|
|
- // 开始结束时间为空,数据异常跳过
|
|
|
continue;
|
|
|
}
|
|
|
}
|