diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannelFactory.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannelFactory.java index 4bf8b59d64..85a03abf25 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannelFactory.java +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannelFactory.java @@ -87,7 +87,7 @@ public final class DingTalkAlertChannelFactory implements AlertChannelFactory { .setRequired(false) .build()) .build(); - InputParam atUserIdsParam = InputParam + InputParam atDingtalkIdsParam = InputParam .newBuilder(DingTalkParamsConstants.NAME_DING_TALK_AT_USERIDS, DingTalkParamsConstants.DING_TALK_AT_USERIDS) .addValidate(Validate.newBuilder() @@ -141,7 +141,7 @@ public final class DingTalkAlertChannelFactory implements AlertChannelFactory { .setType("password") .build(); - return Arrays.asList(webHookParam, keywordParam, secretParam, msgTypeParam, atMobilesParam, atUserIdsParam, + return Arrays.asList(webHookParam, keywordParam, secretParam, msgTypeParam, atMobilesParam, atDingtalkIdsParam, isAtAll, isEnableProxy, proxyParam, portParam, userParam, passwordParam); } diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkParamsConstants.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkParamsConstants.java index d68a1bde52..bf658cb562 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkParamsConstants.java +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkParamsConstants.java @@ -40,8 +40,8 @@ public final class DingTalkParamsConstants { static final String DING_TALK_AT_MOBILES = "$t('atMobiles')"; static final String NAME_DING_TALK_AT_MOBILES = "AtMobiles"; - static final String DING_TALK_AT_USERIDS = "$t('atUserIds')"; - static final String NAME_DING_TALK_AT_USERIDS = "AtUserIds"; + static final String DING_TALK_AT_USERIDS = "$t('atDingtalkIds')"; + static final String NAME_DING_TALK_AT_USERIDS = "AtDingtalkIds"; static final String DING_TALK_AT_ALL = "$t('isAtAll')"; static final String NAME_DING_TALK_AT_ALL = "IsAtAll"; diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java index 527e38cf77..467b74f0e8 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java +++ b/dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java @@ -67,7 +67,7 @@ public final class DingTalkSender { private String msgType; private final String atMobiles; - private final String atUserIds; + private final String atDingtalkIds; private final Boolean atAll; private final Boolean enableProxy; @@ -87,7 +87,7 @@ public final class DingTalkSender { msgType = config.get(DingTalkParamsConstants.NAME_DING_TALK_MSG_TYPE); 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)); enableProxy = Boolean.valueOf(config.get(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE)); @@ -271,8 +271,8 @@ public final class DingTalkSender { builder.append(" "); }); } - if (org.apache.commons.lang3.StringUtils.isNotBlank(atUserIds)) { - Arrays.stream(atUserIds.split(",")).forEach(value -> { + if (org.apache.commons.lang3.StringUtils.isNotBlank(atDingtalkIds)) { + Arrays.stream(atDingtalkIds.split(",")).forEach(value -> { builder.append("@"); builder.append(value); builder.append(" "); @@ -297,12 +297,12 @@ public final class DingTalkSender { org.apache.commons.lang3.StringUtils.isNotBlank(atMobiles) ? atMobiles.split(",") : new String[0]; String[] atUserArray = - org.apache.commons.lang3.StringUtils.isNotBlank(atUserIds) ? atUserIds.split(",") + org.apache.commons.lang3.StringUtils.isNotBlank(atDingtalkIds) ? atDingtalkIds.split(",") : new String[0]; boolean isAtAll = Objects.isNull(atAll) ? false : atAll; at.put("atMobiles", atMobileArray); - at.put("atUserIds", atUserArray); + at.put("atDingtalkIds", atUserArray); at.put("isAtAll", isAtAll); items.put("at", at); diff --git a/dolphinscheduler-ui/src/locales/en_US/security.ts b/dolphinscheduler-ui/src/locales/en_US/security.ts index 6a3dcf03dc..f43adb839e 100644 --- a/dolphinscheduler-ui/src/locales/en_US/security.ts +++ b/dolphinscheduler-ui/src/locales/en_US/security.ts @@ -263,7 +263,7 @@ export default { AtSomeoneInRoom: 'At Someone In Room', Destination: 'Destination', AtMobiles: 'At User Mobiles', - AtUserIds: 'At User Ids', + AtDingtalkIds: 'At User Ids', MsgType: 'Msg Type', // eslint-disable-next-line quotes IsAtAll: "{'@'}All", diff --git a/dolphinscheduler-ui/src/locales/zh_CN/security.ts b/dolphinscheduler-ui/src/locales/zh_CN/security.ts index 6ee469db60..463b18f33f 100644 --- a/dolphinscheduler-ui/src/locales/zh_CN/security.ts +++ b/dolphinscheduler-ui/src/locales/zh_CN/security.ts @@ -262,7 +262,7 @@ export default { // eslint-disable-next-line quotes AtMobiles: "被{'@'}人的手机号", // eslint-disable-next-line quotes - AtUserIds: "被{'@'}人的用户ID", + AtDingtalkIds: "被{'@'}人的用户ID", MsgType: '消息类型', // eslint-disable-next-line quotes IsAtAll: "{'@'}所有人",