We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3489ed1 commit 1e069cdCopy full SHA for 1e069cd
docs/md/road-map/redis.md
@@ -152,7 +152,7 @@ public String createOrderByNoLock(OrderAggregate orderAggregate) {
152
// 模拟锁商品库存
153
long decrCount = redissonService.decr(skuEntity.getSku());
154
if (decrCount < 0) return "已无库存[初始化的库存和使用库存,保持一致。orderService.initSkuCount(\"13811216\", 10000);]";
155
- String lockKey = userEntity.getUserId().concat("_").concat(String.valueOf(decrCount));
+ String lockKey = skuEntity.getSku().concat("_").concat(String.valueOf(decrCount));
156
RLock lock = redissonService.getLock(lockKey);
157
try {
158
lock.lock();
0 commit comments