fix(消息通知): 修复发送自定义webhook的消息时空指针的问题
This commit is contained in:
parent
0dfb89007c
commit
5f20dd00e8
|
@ -61,13 +61,15 @@ public abstract class AbstractNoticeSender implements NoticeSender {
|
|||
if (noticeModel.getParamMap().containsKey("customFields")) {
|
||||
String customFields = (String) noticeModel.getParamMap().get("customFields");
|
||||
JSONArray array = JSON.parseArray(customFields);
|
||||
for (Object o : array) {
|
||||
JSONObject jsonObject = JSON.parseObject(o.toString());
|
||||
String name = jsonObject.getString("name");
|
||||
Object value = jsonObject.getObject("value", Object.class);
|
||||
noticeModel.getParamMap().put(name, value); // 处理人
|
||||
if (StringUtils.equals(jsonObject.getString("name"), "处理人")) {
|
||||
noticeModel.getParamMap().put("processor", value); // 处理人
|
||||
if (CollectionUtils.isNotEmpty(array)) {
|
||||
for (Object o : array) {
|
||||
JSONObject jsonObject = JSON.parseObject(o.toString());
|
||||
String name = jsonObject.getString("name");
|
||||
Object value = jsonObject.getObject("value", Object.class);
|
||||
noticeModel.getParamMap().put(name, value); // 处理人
|
||||
if (StringUtils.equals(jsonObject.getString("name"), "处理人")) {
|
||||
noticeModel.getParamMap().put("processor", value); // 处理人
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue