From 9108567fc617c77b525140fcbaac4473650b501e Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 08 十月 2026 14:16:24 +0800
Subject: [PATCH] 项目重构
---
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java | 41 -----------------------------------------
1 files changed, 0 insertions(+), 41 deletions(-)
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java
index 8305bcb..a7e69ae 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java
@@ -2,21 +2,16 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
-import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.RegisterBody;
-import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.common.exception.user.CaptchaException;
-import com.ruoyi.common.exception.user.CaptchaExpireException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory;
-import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService;
/**
@@ -30,12 +25,6 @@
@Autowired
private ISysUserService userService;
- @Autowired
- private ISysConfigService configService;
-
- @Autowired
- private RedisCache redisCache;
-
/**
* 娉ㄥ唽
*/
@@ -44,13 +33,6 @@
String msg = "", username = registerBody.getUsername(), password = registerBody.getPassword();
SysUser sysUser = new SysUser();
sysUser.setUserName(username);
-
- // 楠岃瘉鐮佸紑鍏�
- boolean captchaEnabled = configService.selectCaptchaEnabled();
- if (captchaEnabled)
- {
- validateCaptcha(username, registerBody.getCode(), registerBody.getUuid());
- }
if (StringUtils.isEmpty(username))
{
@@ -90,28 +72,5 @@
}
}
return msg;
- }
-
- /**
- * 鏍¢獙楠岃瘉鐮�
- *
- * @param username 鐢ㄦ埛鍚�
- * @param code 楠岃瘉鐮�
- * @param uuid 鍞竴鏍囪瘑
- * @return 缁撴灉
- */
- public void validateCaptcha(String username, String code, String uuid)
- {
- String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.nvl(uuid, "");
- String captcha = redisCache.getCacheObject(verifyKey);
- redisCache.deleteObject(verifyKey);
- if (captcha == null)
- {
- throw new CaptchaExpireException();
- }
- if (!code.equalsIgnoreCase(captcha))
- {
- throw new CaptchaException();
- }
}
}
--
Gitblit v1.9.3