From 3bca31a7483d13d345c04f2e22689c29fcd0ab32 Mon Sep 17 00:00:00 2001 From: jiang Date: Tue, 12 Nov 2024 11:07:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/auth/service/RegisterVerificationCodeSender.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bonus-auth/src/main/java/com/bonus/auth/service/RegisterVerificationCodeSender.java b/bonus-auth/src/main/java/com/bonus/auth/service/RegisterVerificationCodeSender.java index a7ec260..f5f395c 100644 --- a/bonus-auth/src/main/java/com/bonus/auth/service/RegisterVerificationCodeSender.java +++ b/bonus-auth/src/main/java/com/bonus/auth/service/RegisterVerificationCodeSender.java @@ -3,6 +3,7 @@ package com.bonus.auth.service; import com.bonus.common.core.constant.SecurityConstants; import com.bonus.common.core.domain.R; import com.bonus.common.core.exception.ServiceException; +import com.bonus.common.core.utils.encryption.Sm4Utils; import com.bonus.common.security.service.EmailService; import com.bonus.common.security.service.SmsService; import com.bonus.config.SystemConfig; @@ -43,7 +44,7 @@ public class RegisterVerificationCodeSender implements VerificationCodeStrategy if (!systemConfig.getRegistersConfig().isEmailRegisters()) { throw new ServiceException("请输入正确的联系方式"); } - R userResult = remoteUserService.getUserInfoByEmail(contactInfo, SecurityConstants.INNER); + R userResult = remoteUserService.getUserInfoByEmail(Sm4Utils.encrypt(contactInfo) , SecurityConstants.INNER); if (userResult.getData() != null) { throw new ServiceException("联系方式已经注册账号"); } @@ -52,7 +53,7 @@ public class RegisterVerificationCodeSender implements VerificationCodeStrategy if (!systemConfig.getRegistersConfig().isPhoneRegisters()) { throw new ServiceException("请输入正确的联系方式"); } - R userResult = remoteUserService.getUserInfoByPhone(contactInfo, SecurityConstants.INNER); + R userResult = remoteUserService.getUserInfoByPhone(Sm4Utils.encrypt(contactInfo), SecurityConstants.INNER); if (userResult.getData() != null) { throw new ServiceException("联系方式已经注册账号"); }