1. // user
    2. "passport": "john",
    3. "password": "12345678",
    4. "nickname": "JohnGuo",
    5. })
    6. if err != nil {
    7. }
    8. // user_detail
    9. id, err := result.LastInsertId()
    10. if err != nil {
    11. }
    12. _, err = tx.Ctx(ctx).Insert("user_detail", g.Map{
    13. "site": "https://johng.cn",
    14. "true_name": "GuoQiang",
    15. })
    16. if err != nil {
    17. return err
    18. }
    19. return nil