Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test-in-seata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
仲光辉
test-in-seata
Commits
e30d9031
Commit
e30d9031
authored
Oct 23, 2020
by
仲光辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关于 Seata 对于 SELECT 语句的代理 (读隔离) 2020/10/23 17:05 (ZGH.MercyModest)
parent
4e07ac0d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
OrderServiceImpl.java
...a/cn/dankal/test/order/service/impl/OrderServiceImpl.java
+4
-0
No files found.
02-order-service/src/main/java/cn/dankal/test/order/service/impl/OrderServiceImpl.java
View file @
e30d9031
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment