...
|
...
|
@@ -349,6 +349,7 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
|
transactionContext, _ = factory.CreateTransactionContext(nil)
|
|
|
imInfo *domain.ImInfo
|
|
|
loginSvr = domain_service.NewPgLoginService(transactionContext)
|
|
|
isSenior bool
|
|
|
)
|
|
|
|
|
|
phoneId, e := strconv.Atoi(request.Phone)
|
...
|
...
|
@@ -395,6 +396,7 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
|
err = protocol.NewErrWithMessage(10001)
|
|
|
return
|
|
|
}
|
|
|
isSenior = ok
|
|
|
if ok { // 高管
|
|
|
if loginSvr.ManagerLogin(request.Phone, request.Password) != nil && loginSvr.PartnerLogin(request.Phone, request.Password) != nil {
|
|
|
err = protocol.NewCustomMessage(1, "密码输入有误!")
|
...
|
...
|
@@ -460,7 +462,12 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
|
//添加手机对应的凭证
|
|
|
userAuth.NewRedisUserCredential(request.Phone).AddAuth(rsp.Credentials)
|
|
|
|
|
|
if isSenior {
|
|
|
v = map[string]interface{}{"center": rsp}
|
|
|
} else {
|
|
|
v = map[string]interface{}{}
|
|
|
}
|
|
|
|
|
|
err = transactionContext.CommitTransaction()
|
|
|
return
|
|
|
}
|
...
|
...
|
|