修复redis 分布式锁可能解除失败问题

v1.4.1
Parker 4 years ago
parent 9d392430a2
commit aad018b571

@ -166,11 +166,7 @@ public class Props {
// 获得对象
Object obj = this.getObject(keys);
if(obj != null){
def = "";
def = Convert.convert(String.class, obj);
}
return def;
return Convert.toStr(obj, def);
}
/**
@ -195,10 +191,7 @@ public class Props {
// 获得对象
Object obj = this.getObject(keys);
if(obj != null){
def = Convert.convert(Integer.class, obj);
}
return def;
return Convert.toInt(obj, def);
}
/**
@ -223,10 +216,7 @@ public class Props {
// 获得对象
Object obj = this.getObject(keys);
if(obj != null){
def = Convert.convert(Long.class, obj);
}
return def;
return Convert.toLong(obj, def);
}
@ -252,10 +242,7 @@ public class Props {
// 获得对象
Object obj = this.getObject(keys);
if(obj != null){
def = Convert.convert(Double.class, obj);
}
return def;
return Convert.toDouble(obj, def);
}
@ -282,10 +269,7 @@ public class Props {
// 获得对象
Object obj = this.getObject(keys);
if(obj != null){
def = Convert.convert(Float.class, obj);
}
return def;
return Convert.toFloat(obj, def);
}
@ -311,10 +295,7 @@ public class Props {
// 获得对象
Object obj = this.getObject(keys);
if(obj != null){
def = Convert.convert(Character.class, obj);
}
return def;
return Convert.toChar(obj, def);
}
/**
@ -339,10 +320,7 @@ public class Props {
// 获得对象
Object obj = this.getObject(keys);
if(obj != null){
def = Convert.convert(Boolean.class, obj);
}
return def;
return Convert.toBool(obj, def);
}
/**
@ -386,6 +364,7 @@ public class Props {
if(obj == null){
obj = temp.get(k);
} else if(obj instanceof LinkedHashMap){
//Convert
obj = ((LinkedHashMap) obj).get(k);
}
}

@ -157,7 +157,6 @@ public abstract class BaseRestController <T extends BaseEntity, E extends ApiWra
}finally {
// 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
}else{
// 如果缓存没读到 则去数据库读

@ -144,7 +144,6 @@ public class DictUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
// 如果名称还是 为空 则赋默认值
@ -232,7 +231,6 @@ public class DictUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
@ -346,7 +344,6 @@ public class DictUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}

@ -114,7 +114,6 @@ public class MenuUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
if(menuModel == null){

@ -115,7 +115,6 @@ public class OrgUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
if(orgRefModel == null){

@ -162,7 +162,6 @@ public class UserUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
if(userModel == null){
@ -226,7 +225,6 @@ public class UserUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
if(userModel == null){
@ -313,7 +311,6 @@ public class UserUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
if(roles == null || roles.size() == 0){
@ -402,7 +399,6 @@ public class UserUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
if(permissions == null || permissions.size() == 0){
@ -510,7 +506,6 @@ public class UserUtil {
}finally {
// ============ 释放锁
redisLockPlugins.unLock(redisLock);
redisLock = null;
}
if(menus == null || menus.size() == 0){

@ -92,10 +92,7 @@ public class RedisLockImpl implements RedisLockPlugins {
if(ret == null){
return false;
}
if(1 == ret){
return true;
}
return false;
return 1 == ret;
}catch (Exception e){
log.error(e.getMessage(),e);
}

Loading…
Cancel
Save