Commit f8fe572e4d42973a1f34770a123ed815a059b413

Authored by 云中非
1 parent 801a6b9a

fix: 告警联系人手机号和邮箱验证

@@ -89,7 +89,7 @@ public class YtAlarmContactServiceImpl extends AbstractBaseService<AlarmContactM @@ -89,7 +89,7 @@ public class YtAlarmContactServiceImpl extends AbstractBaseService<AlarmContactM
89 if (Count > 0) { 89 if (Count > 0) {
90 throw new YtDataValidationException("department for this name is exited"); 90 throw new YtDataValidationException("department for this name is exited");
91 } 91 }
92 - if (checkPhoneEmail(tenantId,alarmContactDTO.getPhone(), alarmContactDTO.getEmail()).size() > 1) { 92 + if (checkPhoneEmail(tenantId,alarmContactDTO.getPhone(), alarmContactDTO.getEmail()).size() > 0) {
93 throw new YtDataValidationException(ErrorMessage.PHONE_OR_EMAIL_HAS_REGISTER.getMessage()); 93 throw new YtDataValidationException(ErrorMessage.PHONE_OR_EMAIL_HAS_REGISTER.getMessage());
94 } 94 }
95 alarmContactDTO.setTenantId(tenantId); 95 alarmContactDTO.setTenantId(tenantId);