|
|
@@ -97,7 +97,7 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
// } else if (now.compareTo(endDate) >= 0) {
|
|
|
// status = 3;
|
|
|
// }
|
|
|
- lifeCoupon.setStatus(-1);
|
|
|
+ lifeCoupon.setStatus(1);
|
|
|
if (StringUtils.isEmpty(lifeCoupon.getId())) {
|
|
|
lifeCoupon.setType(1);
|
|
|
lifeCoupon.setCouponCode(UniqueRandomNumGenerator.generateUniqueCode(12));
|
|
|
@@ -143,7 +143,7 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
}
|
|
|
// 已结束
|
|
|
if (LocalDate.now().isAfter(coupon.getEndDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate())) {
|
|
|
- status = 3;
|
|
|
+ status = 7;
|
|
|
}
|
|
|
LifeCoupon lifeCoupon = new LifeCoupon();
|
|
|
lifeCoupon.setId(id);
|
|
|
@@ -168,13 +168,13 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
if (order == null) {
|
|
|
errMessage = "没有这张券";
|
|
|
} else {
|
|
|
- if (order.getStatus() == 1) {
|
|
|
+ if (order.getStatus() == 5) {
|
|
|
errMessage = "该券已核销";
|
|
|
}
|
|
|
- if (order.getStatus() == 2) {
|
|
|
+ if (order.getStatus() == 6) {
|
|
|
errMessage = "该券已过期";
|
|
|
}
|
|
|
- if (order.getStatus() == 3) {
|
|
|
+ if (order.getStatus() == 7) {
|
|
|
errMessage = "该券待退款";
|
|
|
}
|
|
|
if (order.getStatus() == 4) {
|
|
|
@@ -190,7 +190,7 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
return resultMap;
|
|
|
}
|
|
|
|
|
|
- order.setStatus(1);
|
|
|
+ order.setStatus(5);
|
|
|
order.setUsedTime(new Date());
|
|
|
lifeUserOrderMapper.updateById(order);
|
|
|
|
|
|
@@ -326,7 +326,7 @@ public class LifeCouponServiceImpl extends ServiceImpl<LifeCouponMapper, LifeCou
|
|
|
@Override
|
|
|
public R<String> orderVerify(Integer orderId) {
|
|
|
OrderCouponMiddle orderCouponMiddle = orderCouponMiddleMapper.selectOne(new LambdaQueryWrapper<OrderCouponMiddle>().eq(OrderCouponMiddle::getId, orderId));
|
|
|
- if (StringUtils.isEmpty(orderCouponMiddle) && orderCouponMiddle.getStatus() != 1) {
|
|
|
+ if (StringUtils.isEmpty(orderCouponMiddle) && orderCouponMiddle.getStatus() != 5) {
|
|
|
return R.fail("该劵不是待使用状态");
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(orderCouponMiddle)) {
|