1779195890

This commit is contained in:
Docker7530
2026-05-19 21:04:53 +08:00
parent 7f14056210
commit 521496f2df
31 changed files with 1185 additions and 173 deletions
+83
View File
@@ -0,0 +1,83 @@
# 任务
- [x] 开发:参加 IBS 项目晨会,同步昨日问题跟进事项。(李春良 0.5)
- [x] 开发:IBS 7.21.0 版本需求开发,3.6 IBS平台邮件通知机制优化—IBS发政企邮件收件人列表增加政企管理员,待自测。(李春良 5.5)
- [x] 联调:华为、中兴、自研解封禁联调,防火墙策略不通,反馈寅杰开通。(李春良 2)
# 日志
现在有个需求:
```
CERT_ADD_SUCCESS_WARNING("email/certAddSuccessWarningMail","证书新增成功反馈")
```
```
<!DOCTYPE html><html lang="en" xmlns:th="http://www.thymeleaf.org"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title th:remove="all">证书新增成功反馈</title>
</head>
<body>
<p>
尊敬的<a th:text="${contactName}" id="cdn-autoid-2"></a><span></span>
</p>
<br>
<p style="text-indent:2em">
<span>检测到</span><span th:text="${enterpriseName}"></span>的<span th:text="${domains}"></span>域名<span style="font-weight: bold">已成功绑定</span><span th:text="${crtName}"></span>证书,请知悉。
</p>
<br>
<p style="text-align:right">
中国移动内容分发
</p>
</body></html>
```
这个邮件只发给了客户,现在需要增加对应的 客户经理管理员。
但是这个服务在 crt,获取更多的信息需要通过 portal 那边,可能需要通过调用 PortalForCrtController 接口的形式获取邮件信息。
关于获取邮箱我前端时间搞过一个获取客户经理管理员邮箱的方法可以参考思路:
```
@Override
public List<User> getAccountManagerList(String provinceCode) {
List<User> userList;
if (ProvinceEnum.Zhengqi.getCode().equalsIgnoreCase(provinceCode) ||
ProvinceEnum.Guoji.getCode().equalsIgnoreCase(provinceCode) ||
ProvinceEnum.Jituan.getCode().equalsIgnoreCase(provinceCode)) {
userList = userRepository.findByRoleAndState(RoleEnum.CMA_ZQ.getRole(), UserStateEnum.NORMAL.getValue());
} else {
userList = findUserByRoleCodeAndProvinceCodeAndState(RoleEnum.CMA_ZQ_PRV.getRole(),
provinceCode,
UserStateEnum.NORMAL);
}
return userList;
}
```
我这个项目过于复杂,使用相关字段和概念一定要分析清楚,有依据。搞完不需要编译,因为这个项目需要手动编译,注意有标准的中文注释和日志。因为只是加发件人,千万不要影响原来的逻辑。
```
CRT_HOST='http://127.0.0.1:8077'
URI='/certificate/service/system/config/save'
ACCESS_KEY='ZbpUBaVB'
SECRET_KEY='18b81d9b49ed230270129ebd0a73416b9a77e1fdfbab03aedace1044b5c345a3'
BODY='{"configKey":"IBS_SERVER_URL","configValue":"http://172.21.145.113:8080","description":"IBS服务地址"}'
TS=$(printf '%X' "$(date +%s)")
N1=$(printf '%s' "$RANDOM$RANDOM$(date +%N)" | xxd -p -c 256 | tr '[:lower:]' '[:upper:]')
K2=$(printf '%s' "$N1" | openssl dgst -sha256 -hmac "$SECRET_KEY" -binary | xxd -p -c 256)
TOKEN=$(printf '%s' "${URI}${TS}${BODY}" | openssl dgst -sha256 -hmac "$K2" -binary | xxd -p -c 256 | tr '[:lower:]' '[:upper:]')
AUTH="${N1}|${TS}|${TOKEN}"
curl -sS -X POST "${CRT_HOST}${URI}" \
-H "Content-Type: application/json" \
-H "AccessKey: ${ACCESS_KEY}" \
-H "Authorization: ${AUTH}" \
-d "${BODY}"
```
# 总结