Skip to content

Commit

Permalink
sms开启
Browse files Browse the repository at this point in the history
  • Loading branch information
SerMs committed Jun 19, 2022
1 parent 83745e3 commit ac9988c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/ms/reggie/controller/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -46,8 +47,8 @@ public R<String> 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);

Expand Down

0 comments on commit ac9988c

Please sign in to comment.