无闻给的例程为何会出错? #1241

Closed
opened 2019-02-22 07:20:41 +00:00 by huxiaobin0315 · 3 comments
huxiaobin0315 commented 2019-02-22 07:20:41 +00:00 (Migrated from github.com)

例程地址:https://github.com/Unknwon/go-rock-libraries-showcases/tree/master/lectures/02-xorm
bug重现:
1,新增一个余额100的用户
2,取款100时,显示余额为0,正确
3,再次查询该用户,余额重新变成100

Please enter number of operation:

  1. Create new account
  2. Show detail of account
  3. Deposit
  4. Withdraw
  5. Make transfer
  6. List exist accounts by Id
  7. List exist accounts by balance
  8. Delete account
  9. Exit
    1
    Please enter :
    Myname 100
    New account has been created

Please enter number of operation:

  1. Create new account
  2. Show detail of account
  3. Deposit
  4. Withdraw
  5. Make transfer
  6. List exist accounts by Id
  7. List exist accounts by balance
  8. Delete account
  9. Exit
    2
    Please enter :
    2
    &main.Account{Id:2, Name:"Myname", Balance:100, Version:1}

Please enter number of operation:

  1. Create new account
  2. Show detail of account
  3. Deposit
  4. Withdraw
  5. Make transfer
  6. List exist accounts by Id
  7. List exist accounts by balance
  8. Delete account
  9. Exit
    4
    Please enter :
    2 100
    &main.Account{Id:2, Name:"Myname", Balance:0, Version:2}

Please enter number of operation:

  1. Create new account
  2. Show detail of account
  3. Deposit
  4. Withdraw
  5. Make transfer
  6. List exist accounts by Id
  7. List exist accounts by balance
  8. Delete account
  9. Exit
    2
    Please enter :
    2
    &main.Account{Id:2, Name:"Myname", Balance:100, Version:2}
例程地址:https://github.com/Unknwon/go-rock-libraries-showcases/tree/master/lectures/02-xorm bug重现: 1,新增一个余额100的用户 2,取款100时,显示余额为0,正确 3,再次查询该用户,余额重新变成100 Please enter number of operation: 1. Create new account 2. Show detail of account 3. Deposit 4. Withdraw 5. Make transfer 6. List exist accounts by Id 7. List exist accounts by balance 8. Delete account 9. Exit 1 Please enter <name> <balance>: Myname 100 New account has been created Please enter number of operation: 1. Create new account 2. Show detail of account 3. Deposit 4. Withdraw 5. Make transfer 6. List exist accounts by Id 7. List exist accounts by balance 8. Delete account 9. Exit 2 Please enter <id>: 2 &main.Account{Id:2, Name:"Myname", Balance:100, Version:1} Please enter number of operation: 1. Create new account 2. Show detail of account 3. Deposit 4. Withdraw 5. Make transfer 6. List exist accounts by Id 7. List exist accounts by balance 8. Delete account 9. Exit 4 Please enter <id> <withdraw>: 2 100 &main.Account{Id:2, Name:"Myname", Balance:0, Version:2} Please enter number of operation: 1. Create new account 2. Show detail of account 3. Deposit 4. Withdraw 5. Make transfer 6. List exist accounts by Id 7. List exist accounts by balance 8. Delete account 9. Exit 2 Please enter <id>: 2 &main.Account{Id:2, Name:"Myname", Balance:100, Version:2}
wudaoren commented 2019-03-13 04:00:06 +00:00 (Migrated from github.com)

兄弟给个例子说明吧

兄弟给个例子说明吧
huxiaobin0315 commented 2019-03-17 16:29:53 +00:00 (Migrated from github.com)

兄弟给个例子说明吧

我写了复现方法了呀

> 兄弟给个例子说明吧 我写了复现方法了呀
jinjiang2009 commented 2019-05-14 01:25:11 +00:00 (Migrated from github.com)

是不是重复加载程序了呢?

是不是重复加载程序了呢?
lunny closed this issue 2021-06-06 05:57:28 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#1241
No description provided.