...
|
...
|
@@ -459,13 +459,16 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
|
rsp.Phone = request.Phone
|
|
|
rsp.Credentials, _ = utils.GenerateToken(int64(phoneId), request.Phone, protocol.RefreshTokenExipre*time.Second)
|
|
|
|
|
|
//添加手机对应的凭证
|
|
|
// 添加手机对应的凭证
|
|
|
userAuth.NewRedisUserCredential(request.Phone).AddAuth(rsp.Credentials)
|
|
|
|
|
|
// 判断是否高管
|
|
|
if isSenior {
|
|
|
v = map[string]interface{}{"center": rsp}
|
|
|
} else {
|
|
|
v = map[string]interface{}{}
|
|
|
rsp.Partner.(map[string]interface{})["companys"] = rsp.Manager.(map[string]interface{})["companys"]
|
|
|
rsp.Manager.(map[string]interface{})["companys"] = []struct{}{}
|
|
|
v = map[string]interface{}{"center": rsp}
|
|
|
}
|
|
|
|
|
|
err = transactionContext.CommitTransaction()
|
...
|
...
|
|