Files
notes/work/移动杭研/问题处理/2023-04/0407-关于试用单点击配置提示“配置完成,获取修改密码链接失败用户名已存在”.md
2026-03-01 01:43:46 +08:00

87 lines
3.0 KiB
Markdown
Raw Permalink 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.
# 问题截图
![](../../../../attachment/images-uuid/ec199b5434a146d8b70272f372fa8757.png)
![](../../../../attachment/images-uuid/aafd672aae1340b29a9bf5363654a4b0.png)
# 数据库信息统计
## IBS 系统 user 表:
第一次开户: feng.shi@legendata.net 15358165074 石烽 13962108439cmcc
第二次开户: 13962108439@139.com 13962108439cmcc 石峰 cmcc
## IAM 的 user 表:
第一次开户:2022-08-22 16:28:33,feng.shi@legendata.net,13962108439cmcc,6567b552ad87e4470eca7859a2a8f0f8c8702759
## IBS 系统 enterprise_info 表:
2022-08-22 08:28:30,200A9992007369685 feng.shi@legendata.net,石烽,13962108439,v23xcyrt-id8cxo0dhlpkqu9a,81928567
2023-04-06 03:14:03,250A51238635004 13962108439@139.com,石峰,13962108439,lta1q52b-t07etgiqfgxq90bt,81041147
## 企业信息
v23xcyrt-id8cxo0dhlpkqu9a,上海众传信息科技有限公司 200A9992007369685
lta1q52b-t07etgiqfgxq90bt,上海众传信息科技有限公司(园区) 250A51238635004 问题单
## 工单号
试商用工单:250A230309395479001
## 发到 IAM 请求参数
{
"role":" 企业 ",
"phone":"13962108439",
"source":"IBS",
"userName":"13962108439cmcc",
"department":" 企业 ",
"email":"13962108439@139.com",
"tenant":" 企业 "
}
## 其他
private String epConfig = EnterpriseConfigEnum.NOTCONFIG.getCode();//企业配置状态
com.cmcc.cdn.platform.selfservice.enums.EnterpriseConfigEnum
com.cmcc.cdn.platform.selfservice.service.impl.EnterpriseServiceImpl#checkMobileAndEmail
# 复现
![](../../../../attachment/images-uuid/09d5834edcda42fdbe26221eb43e4ecc.png)
![](../../../../attachment/images-uuid/f5bb9b54d08f4166891a9f3bcc75406c.png)
# 关键代码
```java
com.cmcc.cdn.platform.selfservice.service.impl.EnterpriseServiceImpl#checkMobileAndEmail
```
# 问题总结
目前根本问题是客户在第一次开户之后进行了手机号和邮箱的修改,当客户进行第二次开户的时候,我们通过了第一次的手机号邮箱的校验,这时候在 iam 系统是无法通过用户唯一的校验的,导致客户出现用户已存在的报错。
临时的解决方案,需客户提供一个系统中不存在的手机号,通过更改试用单的联系方式二次触发。
需要处理的表:preorder_infoec_number)、userphone)、enterprise_infocontact_phone、mobile_encrypt
> contact_phone 的加密方式可参考:
>
> com.cmcc.cdn.platform.common.encryption.DESUtils#encrypt(java.lang.String, java.lang.String)
但是也要在 user 表中有相应的匹配,因为在 iam 通过后会更新 user 表中的信息。代码如下
```java
json = JSONObject.parseObject(json.getString("data"));
json.put("url", json.getString("url"));
json.put("verCode", json.getString("verCode"));
User user = userService.findByMobileAndRoleNotInAdmin(vo.getContactPhone());
user.setUserCode(json.getString("userCode"));
user.setUserAccount(vo.getContactPhone() + "cmcc"); // 登录名
userRepository.save(user);
```