Commit e30d9031 by 仲光辉

关于 Seata 对于 SELECT 语句的代理 (读隔离) 2020/10/23 17:05 (ZGH.MercyModest)

parent 4e07ac0d
...@@ -65,6 +65,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements ...@@ -65,6 +65,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
} }
// 设置订单金额 // 设置订单金额
order.setMoney(BigDecimal.valueOf(new Random().nextDouble()*1000)); order.setMoney(BigDecimal.valueOf(new Random().nextDouble()*1000));
// TODO 关于 Seata 对于 SELECT 语句的代理
// @see http://seata.io/zh-cn/docs/overview/what-is-seata.html --> 读隔离
// 查询用户余额
// accountService.getOne(new LambdaQueryWrapper<Account>().eq(Account::getUserId,userId).last("FOR UPDATE"));
// 创建订单 // 创建订单
return this.save(order); return this.save(order);
} }
......
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