Initial commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
来源:测试
|
||||
|
||||
# 问题
|
||||
|
||||
域名配置需求工单,在提单的时候如果是单个域名,是合法的。但是如果是批量域名,域名列表显示的非法的。
|
||||
|
||||
最终排查位置:com.cmcc.cdn.platform.selfservice.order.DomainOrderService#updateCheckedIcpInfo
|
||||
|
||||
因为当用域名获取信安信息后 Map 中是真域名对应的备案号。
|
||||
|
||||
但是后边直接用这个 Map 去查库了,导致更新的是真实域名的备案号。
|
||||
|
||||
进行了 Map 的更新。
|
||||
|
||||

|
||||
|
||||
```java
|
||||
if (WorkOrderEnums.Type.domain_request.name().equals(order.getType())) {
|
||||
// 因map中生成的为【真实域名,真实域名对应的备案号】,需替换为【假域名,真实域名对应的备案号】格式刷库
|
||||
for (BatchSelfDomainPO batchSelfPo : ls) {
|
||||
String cpDomain = batchSelfPo.getCpDomain();
|
||||
String domain = batchSelfPo.getDomain();
|
||||
if (StringUtils.isNotEmpty(cpDomain)) {
|
||||
map.put(domain, map.get(cpDomain));
|
||||
map.remove(cpDomain);
|
||||
}
|
||||
}
|
||||
selfServiceDomainConfigService.updateLegalByMap(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLegalByMap(Map<String, String> map) {
|
||||
for (Map.Entry<String, String> stringStringEntry : map.entrySet()) {
|
||||
SelfServiceDomainConfigPO po = selfServiceDomainConfigDao.findByDomain(stringStringEntry.getKey()).orElse(null);
|
||||
if (Objects.nonNull(po)) {
|
||||
po.setLegal(StringUtils.isNotEmpty(po.getIcp()) ? po.getIcp().equals(stringStringEntry.getValue()) : false);
|
||||
// po.setIcp(stringStringEntry.getValue());
|
||||
selfServiceDomainConfigDao.save(po);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user