Commit 9cc7d170 authored by 唐峰's avatar 唐峰

短验校验,redis key 增加租户逻辑判断2

parent 210f5c85
......@@ -91,7 +91,7 @@ public class SmsServiceImpl implements ISmsService {
}
SessionStruct sessionStruct = XyqbSessionContextHolder.getXSession();
String key = Constants.REDIS_PREFIX_VERIFICATION_CODE + phoneNo;
if (!UserConstant.defaultTenantId.equals(sessionStruct.getTenantId())) {
if (sessionStruct != null && !UserConstant.defaultTenantId.equals(sessionStruct.getTenantId())) {
key = Constants.REDIS_PREFIX_VERIFICATION_CODE + sessionStruct.getTenantId() + "_" + phoneNo;
}
String randomCode = stringRedisTemplate.opsForValue().get(key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment