sys.visit.tokentime解析出错加保护
This commit is contained in:
parent
f34656b648
commit
9eb49e1b09
|
|
@ -206,8 +206,12 @@ public class TokenService {
|
|||
private Long getTokenTime(){
|
||||
long tokenTime = 20L;
|
||||
String redisResult = redisService.getCacheObject("sys_config:"+ "sys.visit.tokentime");
|
||||
if(!redisResult.isEmpty()) {
|
||||
if(StringUtils.isNotEmpty(redisResult)) {
|
||||
try {
|
||||
tokenTime = Long.parseLong(redisResult);
|
||||
} catch (Exception e) {
|
||||
tokenTime = 43200L; //MINUTES
|
||||
}
|
||||
}else {
|
||||
Long result = systemConfig.getTokenTime();
|
||||
if (!ObjectUtil.isEmpty(result)){
|
||||
|
|
|
|||
Loading…
Reference in New Issue