|
|
@@ -89,6 +89,8 @@ public class DomainOrderService {
|
|
|
AtomicBoolean checkPoint = checkPoint(userId);
|
|
|
List<DomainOrder> notPaidOrders = domainOrderRepo.findAllByUserIdAndOrderStatus(userId, OrderStatus.NOT_PAID);
|
|
|
Long superUserId = Long.valueOf(sysConfigService.getString("domain_superUserId"));
|
|
|
+ int min = sysConfigService.getInt("domain_minimum");
|
|
|
+ min = min + 4;
|
|
|
if (notPaidOrders.size() > 0) {
|
|
|
throw new BusinessException("已存在未支付订单,不可继续下单");
|
|
|
}
|
|
|
@@ -100,12 +102,12 @@ public class DomainOrderService {
|
|
|
throw new BusinessException("禁止注册中文域名");
|
|
|
}
|
|
|
if (!checkPoint.get()) {
|
|
|
- if (domain.length() < 9 || domain.length() > 20) {
|
|
|
+ if (domain.length() < min || domain.length() > 20) {
|
|
|
throw new BusinessException("四位及以下域名只能官方创建。");
|
|
|
}
|
|
|
} else {
|
|
|
if (domain.length() < 8 || domain.length() > 20) {
|
|
|
- throw new BusinessException("四位及以下域名只能官方创建。");
|
|
|
+ throw new BusinessException("四位以下域名只能官方创建。");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -201,6 +203,8 @@ public class DomainOrderService {
|
|
|
}
|
|
|
|
|
|
public Map<String, Object> check(String domain) {
|
|
|
+ int min = sysConfigService.getInt("domain_minimum");
|
|
|
+ min = min + 4;
|
|
|
AtomicBoolean checkPoint = checkPoint(SecurityUtils.getAuthenticatedUser().getId());
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
Long superUserId = Long.valueOf(sysConfigService.getString("domain_superUserId"));
|
|
|
@@ -221,7 +225,7 @@ public class DomainOrderService {
|
|
|
return result;
|
|
|
}
|
|
|
if (!checkPoint.get()) {
|
|
|
- if (visibleDomain.length() < 9 || visibleDomain.length() > 20) {
|
|
|
+ if (visibleDomain.length() < min || visibleDomain.length() > 20) {
|
|
|
result.put("result", false);
|
|
|
result.put("reason", "域名长度不合规");
|
|
|
return result;
|