|
@@ -493,11 +493,14 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
|
@@ -493,11 +493,14 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
493
|
loginSvr = domain_service.NewPgLoginService(transactionContext)
|
493
|
loginSvr = domain_service.NewPgLoginService(transactionContext)
|
494
|
claim *utils.UserTokenClaims
|
494
|
claim *utils.UserTokenClaims
|
495
|
)
|
495
|
)
|
|
|
496
|
+
|
496
|
rsp = &protocolx.CompanysResponse{}
|
497
|
rsp = &protocolx.CompanysResponse{}
|
|
|
498
|
+
|
497
|
if err = transactionContext.StartTransaction(); err != nil {
|
499
|
if err = transactionContext.StartTransaction(); err != nil {
|
498
|
log.Error(err)
|
500
|
log.Error(err)
|
499
|
return nil, err
|
501
|
return nil, err
|
500
|
}
|
502
|
}
|
|
|
503
|
+
|
501
|
defer func() {
|
504
|
defer func() {
|
502
|
transactionContext.RollbackTransaction()
|
505
|
transactionContext.RollbackTransaction()
|
503
|
}()
|
506
|
}()
|
|
@@ -517,7 +520,7 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
|
@@ -517,7 +520,7 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
517
|
}
|
520
|
}
|
518
|
|
521
|
|
519
|
// loginSvr 初始化
|
522
|
// loginSvr 初始化
|
520
|
- loginSvr.Init(claim.Phone)
|
523
|
+ _ = loginSvr.Init(claim.Phone)
|
521
|
|
524
|
|
522
|
// 高管标志位初始化
|
525
|
// 高管标志位初始化
|
523
|
_ = loginSvr.InitSenior(claim.Phone)
|
526
|
_ = loginSvr.InitSenior(claim.Phone)
|
|
@@ -525,6 +528,11 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
|
@@ -525,6 +528,11 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
525
|
// 合伙人标志位初始化
|
528
|
// 合伙人标志位初始化
|
526
|
_ = loginSvr.InitPartner(claim.Phone)
|
529
|
_ = loginSvr.InitPartner(claim.Phone)
|
527
|
|
530
|
|
|
|
531
|
+ if len(loginSvr.PartnerInfo) == 0 && len(loginSvr.Users) == 0 {
|
|
|
532
|
+ err = protocol.NewErrWithMessage(10006)
|
|
|
533
|
+ return
|
|
|
534
|
+ }
|
|
|
535
|
+
|
528
|
rsp.Partner, _ = loginSvr.PartnerStaticInfo()
|
536
|
rsp.Partner, _ = loginSvr.PartnerStaticInfo()
|
529
|
rsp.Manager, _ = loginSvr.ManagerStaticInfo()
|
537
|
rsp.Manager, _ = loginSvr.ManagerStaticInfo()
|
530
|
|
538
|
|