wangqifan 3 years ago
parent
commit
f015ddf6ff
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/main/java/com/izouma/nineth/service/DomainOrderService.java

+ 4 - 0
src/main/java/com/izouma/nineth/service/DomainOrderService.java

@@ -88,6 +88,10 @@ public class DomainOrderService {
         if (singlePrice.multiply(BigDecimal.valueOf(year)).compareTo(price) != 0) {
             throw new BusinessException("价格不符");
         }
+        LocalDateTime startTime = LocalDateTime.of(2023, 2, 10, 15, 0, 0);
+        if (LocalDateTime.now().isBefore(startTime)) {
+            throw new BusinessException("时间不符");
+        }
 //        if (price.compareTo(BigDecimal.valueOf(40L)) != 0) {
 //            throw new BusinessException("订单价格与配置不符,请重新下单.");
 //        }