|
@@ -214,6 +214,9 @@ public class CouponFrontController {
|
|
|
throw BusinessRuntimeException.getInstance("该优惠码只适用于新用户");
|
|
throw BusinessRuntimeException.getInstance("该优惠码只适用于新用户");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (dto.getIsValidTime() && dto.getValidStartTime().after(DateTime.now())) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("该优惠码未失效");
|
|
|
|
|
+ }
|
|
|
if (dto.getIsValidTime() && dto.getValidEndTime().before(DateTime.now())) {
|
|
if (dto.getIsValidTime() && dto.getValidEndTime().before(DateTime.now())) {
|
|
|
throw BusinessRuntimeException.getInstance("该优惠码已失效");
|
|
throw BusinessRuntimeException.getInstance("该优惠码已失效");
|
|
|
}
|
|
}
|