Merge branch 'dev-nx' of http://192.168.0.56:3000/bonus/devicesmgt into dev-nx
This commit is contained in:
commit
d2a843ef07
|
|
@ -4,6 +4,9 @@ import java.io.Serializable;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息
|
* 用户信息
|
||||||
|
|
|
||||||
|
|
@ -64,12 +64,18 @@ public class TokenController {
|
||||||
String uuid = form.getUuid();
|
String uuid = form.getUuid();
|
||||||
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
||||||
if (StringUtils.isBlank(captcha)) {
|
if (StringUtils.isBlank(captcha)) {
|
||||||
|
// 删除验证码缓存
|
||||||
|
redisService.deleteObject(CacheConstants.CAPTCHA_CODE_KEY + uuid);
|
||||||
return R.fail("验证码超时,请重新刷新");
|
return R.fail("验证码超时,请重新刷新");
|
||||||
}
|
}
|
||||||
if (form.getCode() != null && form.getCode().equals(captcha)) {
|
if (form.getCode() != null && form.getCode().equals(captcha)) {
|
||||||
|
// 删除验证码缓存
|
||||||
|
redisService.deleteObject(CacheConstants.CAPTCHA_CODE_KEY + uuid);
|
||||||
// 获取登录token
|
// 获取登录token
|
||||||
return R.ok(tokenService.createToken(userInfo));
|
return R.ok(tokenService.createToken(userInfo));
|
||||||
} else {
|
} else {
|
||||||
|
// 删除验证码缓存
|
||||||
|
redisService.deleteObject(CacheConstants.CAPTCHA_CODE_KEY + uuid);
|
||||||
return R.fail("验证码错误");
|
return R.fail("验证码错误");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue