|
@@ -349,6 +349,7 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
@@ -349,6 +349,7 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
349
|
transactionContext, _ = factory.CreateTransactionContext(nil)
|
349
|
transactionContext, _ = factory.CreateTransactionContext(nil)
|
350
|
imInfo *domain.ImInfo
|
350
|
imInfo *domain.ImInfo
|
351
|
loginSvr = domain_service.NewPgLoginService(transactionContext)
|
351
|
loginSvr = domain_service.NewPgLoginService(transactionContext)
|
|
|
352
|
+ isSenior bool
|
352
|
)
|
353
|
)
|
353
|
|
354
|
|
354
|
phoneId, e := strconv.Atoi(request.Phone)
|
355
|
phoneId, e := strconv.Atoi(request.Phone)
|
|
@@ -395,6 +396,7 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
@@ -395,6 +396,7 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
395
|
err = protocol.NewErrWithMessage(10001)
|
396
|
err = protocol.NewErrWithMessage(10001)
|
396
|
return
|
397
|
return
|
397
|
}
|
398
|
}
|
|
|
399
|
+ isSenior = ok
|
398
|
if ok { // 高管
|
400
|
if ok { // 高管
|
399
|
if loginSvr.ManagerLogin(request.Phone, request.Password) != nil && loginSvr.PartnerLogin(request.Phone, request.Password) != nil {
|
401
|
if loginSvr.ManagerLogin(request.Phone, request.Password) != nil && loginSvr.PartnerLogin(request.Phone, request.Password) != nil {
|
400
|
err = protocol.NewCustomMessage(1, "密码输入有误!")
|
402
|
err = protocol.NewCustomMessage(1, "密码输入有误!")
|
|
@@ -460,7 +462,12 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
@@ -460,7 +462,12 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
460
|
//添加手机对应的凭证
|
462
|
//添加手机对应的凭证
|
461
|
userAuth.NewRedisUserCredential(request.Phone).AddAuth(rsp.Credentials)
|
463
|
userAuth.NewRedisUserCredential(request.Phone).AddAuth(rsp.Credentials)
|
462
|
|
464
|
|
463
|
- v = map[string]interface{}{"center": rsp}
|
465
|
+ if isSenior {
|
|
|
466
|
+ v = map[string]interface{}{"center": rsp}
|
|
|
467
|
+ } else {
|
|
|
468
|
+ v = map[string]interface{}{}
|
|
|
469
|
+ }
|
|
|
470
|
+
|
464
|
err = transactionContext.CommitTransaction()
|
471
|
err = transactionContext.CommitTransaction()
|
465
|
return
|
472
|
return
|
466
|
}
|
473
|
}
|