zoujiajian 3 years ago
parent
commit
451f599aa3

+ 3 - 0
netflix-web/src/main/java/com/cyksj/web/controller/coupon/CouponFrontController.java

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