mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-26 04:39:53 +01:00
commit
856bf2c574
1 changed files with 4 additions and 2 deletions
|
|
@ -72,10 +72,12 @@ public class DeviceController {
|
||||||
return new Result<String>().error(ErrorCode.MCA_NOT_NULL);
|
return new Result<String>().error(ErrorCode.MCA_NOT_NULL);
|
||||||
}
|
}
|
||||||
// 生成六位验证码
|
// 生成六位验证码
|
||||||
String code = String.valueOf(Math.random()).substring(2, 8);
|
String code;
|
||||||
String key = RedisKeys.getDeviceCaptchaKey(code);
|
String key;
|
||||||
String existsMac = null;
|
String existsMac = null;
|
||||||
do {
|
do {
|
||||||
|
code = String.valueOf(Math.random()).substring(2, 8);
|
||||||
|
key = RedisKeys.getDeviceCaptchaKey(code);
|
||||||
existsMac = (String) redisUtils.get(key);
|
existsMac = (String) redisUtils.get(key);
|
||||||
} while (StringUtils.isNotBlank(existsMac));
|
} while (StringUtils.isNotBlank(existsMac));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue