作者 yangfu

1.登录修改 增加日志

... ... @@ -28,10 +28,10 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp
}
defer func() {
if err != nil {
log.Error(err)
transactionContext.RollbackTransaction()
return
}
err = transactionContext.CommitTransaction()
}()
rsp = &protocol.LoginResponse{}
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
break
}
rsp.AuthCode, _ = utils.GenerateToken(partnerInfo.Id, protocol.AuthCodeExpire*time.Second)
err = transactionContext.CommitTransaction()
return
}
... ...