From 6f97a42dccaedb7a8950feac205080e63d8be439 Mon Sep 17 00:00:00 2001 From: yupeng <roc__yu@163.com> Date: 星期三, 26 二月 2025 14:27:01 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' into xizang-changyun --- ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index a9f2046..b239bd0 100644 --- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.common.utils.SmsUtil; import com.ruoyi.framework.web.service.TokenService; import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.web.controller.tool.MsgUtils; @@ -54,6 +55,8 @@ private ISysRoleService roleService; @Autowired private MsgUtils msgUtils; + @Autowired + private SmsUtil smsUtil; /** * 账号密码登录 @@ -127,7 +130,7 @@ String code = String.valueOf((int) (Math.random() * 1000000)); redisCache.setCacheObject(phone, code,5*60,TimeUnit.SECONDS); try { - msgUtils.sendMsg(phone, code); + smsUtil.sendSms(phone, "", new String[]{code}); } catch (Exception e) { throw new RuntimeException(e); } -- Gitblit v1.7.1