Commit d7cc97ec by ping.wu

灰度压测下单并发锁去掉

parent 88f8a2b1
...@@ -149,10 +149,10 @@ public class OrderAdapterServiceImpl implements OrderAdapterService { ...@@ -149,10 +149,10 @@ public class OrderAdapterServiceImpl implements OrderAdapterService {
// 锁定秒数从apollo获取,如果apollo没有设置,默认5秒 // 锁定秒数从apollo获取,如果apollo没有设置,默认5秒
String createOrderKey = CREATE_ORDER_KEY + assortmentCustomerInfoVo.getMemberId(); String createOrderKey = CREATE_ORDER_KEY + assortmentCustomerInfoVo.getMemberId();
try { try {
Long expire = Long.valueOf(createOrderKeyExpire); // Long expire = Long.valueOf(createOrderKeyExpire);
if (!LockUtils.lock(redisCache.getRedisTemplate(), createOrderKey, expire)) { // if (!LockUtils.lock(redisCache.getRedisTemplate(), createOrderKey, expire)) {
return ResponseUtil.error(ResponseResult.ORDER_NOT_CREATE_ERROR); // return ResponseUtil.error(ResponseResult.ORDER_NOT_CREATE_ERROR);
} // }
return orderService.createOrderNew(createOrderVo); return orderService.createOrderNew(createOrderVo);
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment