sys.visit.tokentime解析保护

This commit is contained in:
sxu 2025-05-19 11:02:49 +08:00
parent c7c5f3c2ed
commit a173f521a0
1 changed files with 5 additions and 1 deletions

View File

@ -207,7 +207,11 @@ public class TokenService {
long tokenTime = 20L;
String redisResult = redisService.getCacheObject("sys_config:"+ "sys.visit.tokentime");
if(StringUtils.isNotEmpty(redisResult)) {
try {
tokenTime = Long.parseLong(redisResult);
} catch (Exception e) {
tokenTime = 43200L; //MINUTES
}
}else {
Long result = systemConfig.getTokenTime();
if (!ObjectUtil.isEmpty(result)){