|
@@ -38,6 +38,10 @@ public class DomainOrderService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public DomainOrder create(Long userId, String domain, BigDecimal price) {
|
|
public DomainOrder create(Long userId, String domain, BigDecimal price) {
|
|
|
|
|
+ List<DomainOrder> notPaidOrders = domainOrderRepo.findAllByUserIdAndOrderStatus(userId, OrderStatus.NOT_PAID);
|
|
|
|
|
+ if (notPaidOrders.size() > 0) {
|
|
|
|
|
+ throw new BusinessException("已存在未支付订单,不可继续下单");
|
|
|
|
|
+ }
|
|
|
if (domain.length() < 5) {
|
|
if (domain.length() < 5) {
|
|
|
throw new BusinessException("四位及以下域名只能官方创建。");
|
|
throw new BusinessException("四位及以下域名只能官方创建。");
|
|
|
}
|
|
}
|
|
@@ -93,7 +97,7 @@ public class DomainOrderService {
|
|
|
int dotIndex = domain.indexOf(".");
|
|
int dotIndex = domain.indexOf(".");
|
|
|
domain = domain.substring(0, dotIndex);
|
|
domain = domain.substring(0, dotIndex);
|
|
|
}
|
|
}
|
|
|
- List<DomainOrder> used = domainOrderRepo.searchUsedDomain(domain, OrderStatus.CANCELLED);
|
|
|
|
|
|
|
+ List<DomainOrder> used = domainOrderRepo.searchUsedDomain(domain, OrderStatus.FINISH);
|
|
|
|
|
|
|
|
String n = domain.substring(domain.length() - 1);
|
|
String n = domain.substring(domain.length() - 1);
|
|
|
List<Map<String, Object>> recommend = new ArrayList<>();
|
|
List<Map<String, Object>> recommend = new ArrayList<>();
|