|
|
@@ -28,35 +28,35 @@ public class InformAddresseeCO implements Serializable {
|
|
|
|
|
|
public List<String> getEmailAddressees() {
|
|
|
if (Boolean.TRUE.equals(informStrategy.getEmail())) {
|
|
|
- return users.stream().map(KeycloakUserCO::getEmail).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
+ return users.stream().map(KeycloakUserCO::getEmail).filter(StringUtils::isNotBlank).distinct().collect(Collectors.toList());
|
|
|
}
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
public List<String> getWeChatAddressees() {
|
|
|
if (Boolean.TRUE.equals(informStrategy.getWechat())) {
|
|
|
- return users.stream().map(KeycloakUserCO::getWechat).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
+ return users.stream().map(KeycloakUserCO::getWechat).filter(StringUtils::isNotBlank).distinct().collect(Collectors.toList());
|
|
|
}
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
public List<String> getUserIds() {
|
|
|
if (Boolean.TRUE.equals(informStrategy.getWechatApplet())) {
|
|
|
- return users.stream().map(KeycloakUserCO::getId).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
+ return users.stream().map(KeycloakUserCO::getId).filter(StringUtils::isNotBlank).distinct().collect(Collectors.toList());
|
|
|
}
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
public List<String> getWeChatAppletAddressees() {
|
|
|
if (Boolean.TRUE.equals(informStrategy.getWechatApplet())) {
|
|
|
- return users.stream().map(KeycloakUserCO::getWechatAppletOpenId).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
+ return users.stream().map(KeycloakUserCO::getWechatAppletOpenId).filter(StringUtils::isNotBlank).distinct().collect(Collectors.toList());
|
|
|
}
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
public List<String> getPhoneAddressees() {
|
|
|
if (Boolean.TRUE.equals(informStrategy.getNote())) {
|
|
|
- return users.stream().map(KeycloakUserCO::getPhone).filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
|
|
+ return users.stream().map(KeycloakUserCO::getPhone).filter(StringUtils::isNotBlank).distinct().collect(Collectors.toList());
|
|
|
}
|
|
|
return Collections.emptyList();
|
|
|
}
|