rev:修改 suo

This commit is contained in:
zhangzq
2023-12-11 16:58:09 +08:00
parent 20c01e934d
commit 146d4a453f

View File

@@ -38,8 +38,12 @@ public class RedissonUtils {
throw new BadRequestException("当前业务正在执行:"+key+",稍后再试");
}
}finally {
if (isLock){
lock.unlock();
if (isLock && lock.isHeldByCurrentThread()){
try {
lock.unlock();
}catch (Exception ex){
System.out.println("redisson锁释放失败"+ex.getMessage());
}
}
}
}