代码提交
This commit is contained in:
parent
6c7048cb95
commit
54be606916
|
@ -28,12 +28,12 @@ public class CaptchaController extends BladeController {
|
|||
|
||||
@PostMapping("/validate")
|
||||
@ApiOperation(value = "验证码校验", notes = "传入需要校验的验证码以及缓存Key")
|
||||
public R<String> validDefaultTime(@RequestParam String code, @RequestParam String key) {
|
||||
public R validDefaultTime(@RequestParam String code, @RequestParam String key) {
|
||||
// 获取验证码
|
||||
String redisCode = bladeRedis.get(CacheNames.CAPTCHA_KEY + key);
|
||||
// 判断验证码
|
||||
if (code == null || !StringUtil.equalsIgnoreCase(redisCode, code)) {
|
||||
return R.fail(1404, "Verification code error");
|
||||
return R.data(1404, "Verification code error");
|
||||
}
|
||||
return R.success("OK");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue