This commit is contained in:
mashuai 2024-05-28 10:29:31 +08:00
parent a79ab95fe0
commit f5ffe11ec9
1 changed files with 3 additions and 3 deletions

View File

@ -57,10 +57,10 @@ public class TokenController {
//web端登录
@PostMapping("login")
public R<?> login(@RequestBody LoginBody form) {
//String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
public R<?> login(@RequestBody LoginBody form) throws Exception {
String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
// 用户登录
LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
LoginUser userInfo = sysLoginService.login(form.getUsername(), decryptedData);
String uuid = form.getUuid();
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
if (StringUtils.isBlank(captcha)) {