|
|
@ -67,7 +67,7 @@ public final class DingTalkSender { |
|
|
|
private String msgType; |
|
|
|
private String msgType; |
|
|
|
|
|
|
|
|
|
|
|
private final String atMobiles; |
|
|
|
private final String atMobiles; |
|
|
|
private final String atUserIds; |
|
|
|
private final String atDingtalkIds; |
|
|
|
private final Boolean atAll; |
|
|
|
private final Boolean atAll; |
|
|
|
|
|
|
|
|
|
|
|
private final Boolean enableProxy; |
|
|
|
private final Boolean enableProxy; |
|
|
@ -87,7 +87,7 @@ public final class DingTalkSender { |
|
|
|
msgType = config.get(DingTalkParamsConstants.NAME_DING_TALK_MSG_TYPE); |
|
|
|
msgType = config.get(DingTalkParamsConstants.NAME_DING_TALK_MSG_TYPE); |
|
|
|
|
|
|
|
|
|
|
|
atMobiles = config.get(DingTalkParamsConstants.NAME_DING_TALK_AT_MOBILES); |
|
|
|
atMobiles = config.get(DingTalkParamsConstants.NAME_DING_TALK_AT_MOBILES); |
|
|
|
atUserIds = config.get(DingTalkParamsConstants.NAME_DING_TALK_AT_USERIDS); |
|
|
|
atDingtalkIds = config.get(DingTalkParamsConstants.NAME_DING_TALK_AT_USERIDS); |
|
|
|
atAll = Boolean.valueOf(config.get(DingTalkParamsConstants.NAME_DING_TALK_AT_ALL)); |
|
|
|
atAll = Boolean.valueOf(config.get(DingTalkParamsConstants.NAME_DING_TALK_AT_ALL)); |
|
|
|
|
|
|
|
|
|
|
|
enableProxy = Boolean.valueOf(config.get(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE)); |
|
|
|
enableProxy = Boolean.valueOf(config.get(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE)); |
|
|
@ -271,8 +271,8 @@ public final class DingTalkSender { |
|
|
|
builder.append(" "); |
|
|
|
builder.append(" "); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(atUserIds)) { |
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(atDingtalkIds)) { |
|
|
|
Arrays.stream(atUserIds.split(",")).forEach(value -> { |
|
|
|
Arrays.stream(atDingtalkIds.split(",")).forEach(value -> { |
|
|
|
builder.append("@"); |
|
|
|
builder.append("@"); |
|
|
|
builder.append(value); |
|
|
|
builder.append(value); |
|
|
|
builder.append(" "); |
|
|
|
builder.append(" "); |
|
|
@ -297,12 +297,12 @@ public final class DingTalkSender { |
|
|
|
org.apache.commons.lang3.StringUtils.isNotBlank(atMobiles) ? atMobiles.split(",") |
|
|
|
org.apache.commons.lang3.StringUtils.isNotBlank(atMobiles) ? atMobiles.split(",") |
|
|
|
: new String[0]; |
|
|
|
: new String[0]; |
|
|
|
String[] atUserArray = |
|
|
|
String[] atUserArray = |
|
|
|
org.apache.commons.lang3.StringUtils.isNotBlank(atUserIds) ? atUserIds.split(",") |
|
|
|
org.apache.commons.lang3.StringUtils.isNotBlank(atDingtalkIds) ? atDingtalkIds.split(",") |
|
|
|
: new String[0]; |
|
|
|
: new String[0]; |
|
|
|
boolean isAtAll = Objects.isNull(atAll) ? false : atAll; |
|
|
|
boolean isAtAll = Objects.isNull(atAll) ? false : atAll; |
|
|
|
|
|
|
|
|
|
|
|
at.put("atMobiles", atMobileArray); |
|
|
|
at.put("atMobiles", atMobileArray); |
|
|
|
at.put("atUserIds", atUserArray); |
|
|
|
at.put("atDingtalkIds", atUserArray); |
|
|
|
at.put("isAtAll", isAtAll); |
|
|
|
at.put("isAtAll", isAtAll); |
|
|
|
|
|
|
|
|
|
|
|
items.put("at", at); |
|
|
|
items.put("at", at); |
|
|
|