正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
| @@ -28,10 +28,10 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp | @@ -28,10 +28,10 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp | ||
| 28 | } | 28 | } |
| 29 | defer func() { | 29 | defer func() { |
| 30 | if err != nil { | 30 | if err != nil { |
| 31 | + log.Error(err) | ||
| 31 | transactionContext.RollbackTransaction() | 32 | transactionContext.RollbackTransaction() |
| 32 | return | 33 | return |
| 33 | } | 34 | } |
| 34 | - err = transactionContext.CommitTransaction() | ||
| 35 | }() | 35 | }() |
| 36 | rsp = &protocol.LoginResponse{} | 36 | rsp = &protocol.LoginResponse{} |
| 37 | if partnerInfo, err = PartnerInfoService.GetPartnerInfo(&query.GetPartnerInfoQuery{Account: request.Phone}); err != nil { | 37 | if partnerInfo, err = PartnerInfoService.GetPartnerInfo(&query.GetPartnerInfoQuery{Account: request.Phone}); err != nil { |
| @@ -72,6 +72,7 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp | @@ -72,6 +72,7 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp | ||
| 72 | break | 72 | break |
| 73 | } | 73 | } |
| 74 | rsp.AuthCode, _ = utils.GenerateToken(partnerInfo.Id, protocol.AuthCodeExpire*time.Second) | 74 | rsp.AuthCode, _ = utils.GenerateToken(partnerInfo.Id, protocol.AuthCodeExpire*time.Second) |
| 75 | + err = transactionContext.CommitTransaction() | ||
| 75 | return | 76 | return |
| 76 | } | 77 | } |
| 77 | 78 |
-
请 注册 或 登录 后发表评论