|
|
@@ -72,6 +72,9 @@ public class DomainOrderService {
|
|
|
if (notPaidOrders.size() > 0) {
|
|
|
throw new BusinessException("已存在未支付订单,不可继续下单");
|
|
|
}
|
|
|
+ if (domain.contains(".uni")) {
|
|
|
+ throw new BusinessException("域名后缀不符合规定.");
|
|
|
+ }
|
|
|
if (!superUserId.equals(SecurityUtils.getAuthenticatedUser().getId())) {
|
|
|
if (isContainChinese(domain)) {
|
|
|
throw new BusinessException("禁止注册中文域名");
|
|
|
@@ -119,14 +122,18 @@ public class DomainOrderService {
|
|
|
}
|
|
|
|
|
|
public Map<String, Object> check(String domain) {
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
Long superUserId = Long.valueOf(sysConfigService.getString("domain_superUserId"));
|
|
|
String visibleDomain = domain;
|
|
|
+ if (domain.contains(".uni")) {
|
|
|
+ result.put("result", false);
|
|
|
+ result.put("reason", "禁止使用.uni");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
if (!domain.contains(".nft")) {
|
|
|
visibleDomain = domain + ".nft";
|
|
|
}
|
|
|
List<String> keywords = Arrays.asList(sysConfigService.getString("domain_keyword").split(","));
|
|
|
-
|
|
|
- Map<String, Object> result = new HashMap<>();
|
|
|
if (!superUserId.equals(SecurityUtils.getAuthenticatedUser().getId())) {
|
|
|
if (keywords.stream().anyMatch(keyword -> org.apache.commons.lang.StringUtils.equals(keyword, domain))) {
|
|
|
result.put("result", false);
|