1.代客下单 失败添加消息提示
This commit is contained in:
parent
b7fc525623
commit
72a3057126
|
|
@ -60,10 +60,12 @@ public class Utils {
|
|||
lock = Boolean.TRUE.equals(redisTemplate.opsForValue().setIfAbsent(lockKey, clientId, 30, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
return supplier.get();
|
||||
} catch (Exception e){
|
||||
} catch (RuntimeException e){
|
||||
log.info("执行出错:{}", e.getMessage());
|
||||
throw new BadRequestException(e.getMessage());
|
||||
}finally{
|
||||
throw e;
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally{
|
||||
redisTemplate.delete(lockKey);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue