提交 35f6f04d 编写于 作者: zlt2000's avatar zlt2000

fix 解锁参数

上级 76327576
......@@ -36,7 +36,7 @@ public class SuperServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M,
if (StrUtil.isEmpty(lockKey)) {
throw new LockException("lockKey is null");
}
Object lock;
Object lock = null;
try {
//加锁
lock = locker.tryLock(lockKey, 10, 60, TimeUnit.SECONDS);
......@@ -55,7 +55,7 @@ public class SuperServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M,
throw new LockException("锁等待超时");
}
} finally {
locker.unlock(lockKey);
locker.unlock(lock);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册