...
|
...
|
@@ -24,9 +24,7 @@ func UserInfo(header *protocol.RequestHeader, request *protocol.UserInfoRequest) |
|
|
return nil, err
|
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
rsp = &protocol.UserInfoResponse{}
|
|
|
if partnerInfo, err = PartnerInfoService.GetPartnerInfo(&query.GetPartnerInfoQuery{Id: int(header.UserId)}); err != nil {
|
...
|
...
|
@@ -88,11 +86,7 @@ func ChangePhone(header *protocol.RequestHeader, request *protocol.ChangePhoneRe |
|
|
return nil, err
|
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
return
|
|
|
}
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if partnerInfo, err = PartnerInfoService.GetPartnerInfo(&query.GetPartnerInfoQuery{Id: int(header.UserId)}); err != nil {
|
|
|
err = protocol.NewErrWithMessage(502, err) //账号不存在
|
...
|
...
|
@@ -112,6 +106,7 @@ func ChangePhone(header *protocol.RequestHeader, request *protocol.ChangePhoneRe |
|
|
}); err != nil {
|
|
|
return
|
|
|
}
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
return
|
|
|
}
|
|
|
|
...
|
...
|
@@ -128,11 +123,7 @@ func ResetPassword(header *protocol.RequestHeader, request *protocol.ResetPasswo |
|
|
return nil, err
|
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
return
|
|
|
}
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
if len(request.NewPwd) < 6 {
|
|
|
err = protocol.NewErrWithMessage(2027)
|
...
|
...
|
@@ -156,6 +147,7 @@ func ResetPassword(header *protocol.RequestHeader, request *protocol.ResetPasswo |
|
|
}); err != nil {
|
|
|
return
|
|
|
}
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
return
|
|
|
}
|
|
|
|
...
|
...
|
@@ -171,11 +163,7 @@ func ChangePassword(header *protocol.RequestHeader, request *protocol.ChangePass |
|
|
return nil, err
|
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
return
|
|
|
}
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
rsp = &protocol.ChangePasswordResponse{}
|
|
|
if !strings.EqualFold(request.NewPwd, request.ConfirmPwd) {
|
...
|
...
|
@@ -205,5 +193,6 @@ func ChangePassword(header *protocol.RequestHeader, request *protocol.ChangePass |
|
|
}); err != nil {
|
|
|
return
|
|
|
}
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
return
|
|
|
} |
...
|
...
|
|