Files
notes/work/移动杭研/问题处理/2023-04/0406-BPM验收反馈失败.md
T
2026-03-01 01:43:46 +08:00

98 lines
3.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 问题起因
BPM 工单号: 046-202303080005
![](../../../../attachment/images-uuid/7a045e8e347147239c1dc4ef6c6e789a.png)
poc-s.test.hihonor.com
poc.test.hihonor.com
poc-a.test.hihonor.com
![](../../../../attachment/images-uuid/85cd3dbc32474cbd90d28862e0d1ad29.png)
![](../../../../attachment/images-uuid/07daa4012b0e44c9b8bb30a9a5727829.png)
![](../../../../attachment/images-uuid/2440beebe12c4a31b83f563efbaf9aba.png)
# 问题描述
BPM 在验收反馈的时候报错:域名校验未通过
关注代码位置:
```java
if (!"true".equalsIgnoreCase(skipFlag) &&
!DomainValidationEnum.VALIDATIONSUCCESS.getCode().equals(testOrderInfo.getCheckDomain())) {
throw new PlatformException("域名校验未通过");
}
```
根据异常抛出位置应关注 skipFlag 的值,下方位置决定了他的值:
```java
boolean isLiveProduct = ProductsBBossEnum.LIVESTREAM.getCode().toString().equals(testOrderInfo.getTestType().get(0));
//直播域名在验收反馈前就已经配置好了,但是校验的标志位未置为配置成功。先调验证方法,如果配置成功则重置标志位
if(isLiveProduct){
verificationStatus(testOrderInfo.getOrderNum(), TestOrderResultEnum.OK.getCode().toString());
}
//验收反馈时,直播域名配置已经入库,预先校验时要校验域名配置
String skipFlag = isLiveProduct ? "false" : "true";
```
问题方法:com.cmcc.cdn.platform.selfservice.service.impl.TestOrderServiceImpl#verificationStatus
下方代码导致未将配置设置未配置已完成:
```java
//试用工单中的试用域名在企业账号下是否完全包含
if (!((testDomain2.size() == domainList.size()
&& testDomain2.containsAll(domainList)) || domainList.containsAll(testDomain2))) {
testDomain2.removeAll(domainList);
for (String domain : testDomain2) {
sb.append(domain).append("、");
}
resultResponse.put("success", false);
resultResponse.put("message", "域名配置未完成:" + sb.substring(0, sb.length() - 1));
log.info("----域名配置未完成:{}----", sb.substring(0, sb.length() - 1));
flag = false;
}
```
```java
if (flag) {
resultResponse.put("success", true);
resultResponse.put("message", "域名配置成功");
testOrderInfo.setCheckDomain(DomainValidationEnum.VALIDATIONSUCCESS.getCode());
} else {
testOrderInfo.setCheckDomain(DomainValidationEnum.VALIDATIONFAIL.getCode());
}
```
下方代码块儿为 domainList 的来源
```java
DataProcess<List<ProductDomainInfoVO>> dataProcess = productTrialService.getProductAndConfigedDomains(preOrderInfo.getEcId());
if (ls != null) {
ls = ls.stream().filter(d -> DomainTicketStateEnum.EFFICIENT.equals(d.getState())).collect(Collectors.toList());
for (EpProductChargeMode ep : op.get()) {
ProductDomainInfoVO vo = new ProductDomainInfoVO();
vo.setState(ep.getProductState());
vo.setProductId(ep.getProductId());
vo.setDomains(ls.stream().filter(d -> ep.getProductId().equals(d.getProduct().getId())).map(d->
new DomainVO(d.getDomain(), d.getProvinces().stream().map(p -> p.getCode()).collect(Collectors.toList()))
).collect(Collectors.toList()));
result.add(vo);
}
}
```
这时候定位到这 3 个域名已经进行了停用,域名状态时停用中。所以域名均被过滤。造成无法通过校验。(DomainTicketStateEnum
# 备注
BPM 在进行验收反馈的时候会有一个域名状态校验步骤。