From c860cd39213a2e3b54cbe7f0a32d9aa0b8cd16d2 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 20 八月 2025 09:31:40 +0800
Subject: [PATCH] 配置修改
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java | 44 +++++++++++++++++++++-----------------------
1 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
index de52f90..cff09cb 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -15,17 +15,17 @@
import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.system.service.ISysRoleService;
-import com.ruoyi.web.controller.tool.MsgUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Set;
-import java.util.concurrent.TimeUnit;
/**
* 登录验证
@@ -50,8 +50,6 @@
private TokenService tokenService;
@Autowired
private ISysRoleService roleService;
- @Autowired
- private MsgUtils msgUtils;
/**
* 账号密码登录
@@ -116,23 +114,23 @@
* @param phone 手机号
* @return 结果
*/
- @ApiOperation(value = "获取验证码",notes = "获取验证码")
- @GetMapping("/getCode")
- public AjaxResult getCode(@RequestParam String phone)
- {
- // 发送验证码并存储到redis
- if (StringUtils.hasLength(phone)) {
- String code = String.valueOf((int) (Math.random() * 1000000));
- redisCache.setCacheObject(phone, code,5*60,TimeUnit.SECONDS);
- try {
- msgUtils.sendMsg(phone, code);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- return AjaxResult.success("发送短信验证码成功!5分钟内有效");
- }
- return AjaxResult.error(500, "发送短信验证码失败,请确认手机号码!");
- }
+// @ApiOperation(value = "获取验证码",notes = "获取验证码")
+// @GetMapping("/getCode")
+// public AjaxResult getCode(@RequestParam String phone)
+// {
+// // 发送验证码并存储到redis
+// if (StringUtils.hasLength(phone)) {
+// String code = String.valueOf((int) (Math.random() * 1000000));
+// redisCache.setCacheObject(phone, code,5*60,TimeUnit.SECONDS);
+// try {
+// msgUtils.sendMsg(phone, code);
+// } catch (Exception e) {
+// throw new RuntimeException(e);
+// }
+// return AjaxResult.success("发送短信验证码成功!5分钟内有效");
+// }
+// return AjaxResult.error(500, "发送短信验证码失败,请确认手机号码!");
+// }
/**
* 获取用户信息
--
Gitblit v1.7.1