后台登录不校验验证码

This commit is contained in:
zzp 2024-12-16 21:07:38 +08:00
parent 11fab0d5b1
commit c7641d2b25
2 changed files with 27 additions and 21 deletions

View File

@ -142,21 +142,21 @@ public class AdminUserService {
jedis.decr(redisLockKey); jedis.decr(redisLockKey);
// return ResultObject.failed("验证码错误,请重新输入!"); // return ResultObject.failed("验证码错误,请重新输入!");
} }
// 暂时去掉验证码校验
// String[] split = captchaList.split(","); // String[] split = captchaList.split(",");
// for (String available : split) { // for (String available : split) {
// if (Objects.equals(captcha, available)) { // if (Objects.equals(captcha, available)) {
log.info("手机号{}验证码校验成功!", phone); log.info("手机号{}验证码校验成功!", phone);
AdminUser adminUser = adminUserMapper.getAdminUserByPhone(phone); AdminUser adminUser = adminUserMapper.getAdminUserByPhone(phone);
if (adminUser == null) { if (adminUser == null) {
return ResultObject.failed("用户不存在,请联系系统管理员!"); return ResultObject.failed("用户不存在,请联系系统管理员!");
} }
if (!adminUser.isActive()) { if (!adminUser.isActive()) {
return ResultObject.failed("用户已被禁用,请联系系统管理员!"); return ResultObject.failed("用户已被禁用,请联系系统管理员!");
} }
LoginVO loginVO = new LoginVO(adminUser); LoginVO loginVO = new LoginVO(adminUser);
jedis.del(redisLockKey, redisCaptchaListKey); jedis.del(redisLockKey, redisCaptchaListKey);
return ResultObject.success(loginVO); return ResultObject.success(loginVO);
// } // }
// } // }
// log.info("没有给手机{}发送过验证码{}, 已发送过的验证码是[{}]", phone, captcha, captchaList); // log.info("没有给手机{}发送过验证码{}, 已发送过的验证码是[{}]", phone, captcha, captchaList);
@ -171,11 +171,11 @@ public class AdminUserService {
/** /**
* 查询管理后台用户 * 查询管理后台用户
* *
* @param name 用户名 模糊匹配 * @param name 用户名 模糊匹配
* @param phone 手机号 模糊匹配 * @param phone 手机号 模糊匹配
* @param page 当前页码 默认第一页 * @param page 当前页码 默认第一页
* @param size 每页长度 默认10条 * @param size 每页长度 默认10条
* @param orderBy 排序参数 要排序的字段 * @param orderBy 排序参数 要排序的字段
* @param direction 排序参数 排序方向 * @param direction 排序参数 排序方向
* @return 查询结果 * @return 查询结果
*/ */

View File

@ -19,10 +19,16 @@ spring:
datasource: datasource:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://121.37.185.246:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai url: jdbc:mysql://192.168.0.142:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
username: root username: financial_prod
password: Xgf_8000 password: mmTFncqmDal5HLRGY0BV
# url: jdbc:mysql://121.37.185.246:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
# username: root
# password: Xgf_8000
redis: redis:
host: 123.60.153.169 host: 192.168.0.172
port: 6379 port: 6379
password: Xgf_redis password: Xgf_redis
# host: 123.60.153.169
# port: 6379
# password: Xgf_redis