...
|
...
|
@@ -493,11 +493,14 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
|
|
loginSvr = domain_service.NewPgLoginService(transactionContext)
|
|
|
claim *utils.UserTokenClaims
|
|
|
)
|
|
|
|
|
|
rsp = &protocolx.CompanysResponse{}
|
|
|
|
|
|
if err = transactionContext.StartTransaction(); err != nil {
|
|
|
log.Error(err)
|
|
|
return nil, err
|
|
|
}
|
|
|
|
|
|
defer func() {
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}()
|
...
|
...
|
@@ -517,7 +520,7 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
|
|
}
|
|
|
|
|
|
// loginSvr 初始化
|
|
|
loginSvr.Init(claim.Phone)
|
|
|
_ = loginSvr.Init(claim.Phone)
|
|
|
|
|
|
// 高管标志位初始化
|
|
|
_ = loginSvr.InitSenior(claim.Phone)
|
...
|
...
|
@@ -525,6 +528,11 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco |
|
|
// 合伙人标志位初始化
|
|
|
_ = loginSvr.InitPartner(claim.Phone)
|
|
|
|
|
|
if len(loginSvr.PartnerInfo) == 0 && len(loginSvr.Users) == 0 {
|
|
|
err = protocol.NewErrWithMessage(10006)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
rsp.Partner, _ = loginSvr.PartnerStaticInfo()
|
|
|
rsp.Manager, _ = loginSvr.ManagerStaticInfo()
|
|
|
|
...
|
...
|
|