L1uxiaolin commented on issue #615:
URL: 
https://github.com/apache/incubator-seata-samples/issues/615#issuecomment-2027957555

   > 你好,
   > 
   > ```
   > if (account.getAmount() - amount < 0) {
   > throw new RuntimeException("余额不足");
   > }
   > ```
   > 
   > 这里应该是
   > 
   > ```
   > if (account.getAmount() - account.getFreezedAmount()< amount  {
   > throw new RuntimeException("余额不足");
   > }
   > ```
   
   你没理解冻结的概念,冻结的意思是这部分钱被某个事务占用了,在冻结期间不能参与其他事务。这个例子是对的。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@seata.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@seata.apache.org
For additional commands, e-mail: dev-h...@seata.apache.org

Reply via email to