修复序列化
This commit is contained in:
1 parent
2a8015ef18
commit
725a2e7de6
1 file changed
+3
-13
+3
-13
@@ -39,8 +39,6 @@ import java.util.*;
|
||||
public class AppVisitorUserController {
|
||||
|
||||
private final VisitorUserService visitorUserService;
|
||||
@Autowired
|
||||
private RedisTemplate redisTemplate;
|
||||
|
||||
@Autowired
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
@@ -110,14 +108,9 @@ public class AppVisitorUserController {
|
||||
private boolean verifyImageCode(String randomStr, String imageCode) {
|
||||
String key = CacheConstants.VISITOR_CODE_KEY + randomStr;
|
||||
String s = stringRedisTemplate.opsForValue().get(key);
|
||||
// Object imageCodeValueObj = redisTemplate.opsForValue().get(key);
|
||||
// if (imageCodeValueObj == null) {
|
||||
// return false;
|
||||
// }
|
||||
if (StringUtils.isBlank(s)){
|
||||
return false;
|
||||
}
|
||||
// String imageCodeValue = imageCodeValueObj.toString();
|
||||
return s.equals(imageCode);
|
||||
}
|
||||
|
||||
@@ -127,12 +120,9 @@ public class AppVisitorUserController {
|
||||
if (StringUtils.isBlank(s)){
|
||||
return false;
|
||||
}
|
||||
// Object smsCodeValueObj = redisTemplate.opsForValue().get(key);
|
||||
// if (smsCodeValueObj == null) {
|
||||
// return false;
|
||||
// }
|
||||
// String o = smsCodeValueObj.toString();
|
||||
return s.equals(smsCode);
|
||||
String result = s.replace("\"", "");
|
||||
boolean equals = result.equals(smsCode);
|
||||
return equals;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user