From ac9988c2fa32c0005be58e86aab5e7899c42a2a7 Mon Sep 17 00:00:00 2001 From: SerMs <1839928782@qq.com> Date: Sun, 19 Jun 2022 16:12:50 +0800 Subject: [PATCH] =?UTF-8?q?sms=E5=BC=80=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ms/reggie/controller/UserController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ms/reggie/controller/UserController.java b/src/main/java/com/ms/reggie/controller/UserController.java index eca192a..337eb50 100644 --- a/src/main/java/com/ms/reggie/controller/UserController.java +++ b/src/main/java/com/ms/reggie/controller/UserController.java @@ -4,6 +4,7 @@ import com.ms.reggie.pojo.User; import com.ms.reggie.service.UserService; import com.ms.reggie.util.R; +import com.ms.reggie.util.SendMessageUtil; import com.ms.reggie.util.ValidateCodeUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; @@ -46,8 +47,8 @@ public R sendMsg(@RequestBody User user, HttpSession session) { //生成随机的四位随机数 String code = ValidateCodeUtils.generateValidateCode(6).toString(); //调用短信服务 -// Integer resultCode = SendMessageUtil.send(phone, "您正在登录湘约楼平台,请妥善保管您得验证码" + code); -// log.info("生成的验证码为:{},{}", code, SendMessageUtil.getMessage(resultCode)); + Integer resultCode = SendMessageUtil.send(phone, "您正在登录湘约楼平台,请妥善保管您得验证码" + code); + log.info("生成的验证码为:{},{}", code, SendMessageUtil.getMessage(resultCode)); //需要将生成的验证码保存到Session log.info("验证码为:{}", code);