作者 陈志颖

fix:修改获取公司接口

... ... @@ -487,6 +487,8 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom
v = map[string]interface{}{"center": rsp}
}
v = map[string]interface{}{"center": rsp}
err = transactionContext.CommitTransaction()
return
}
... ... @@ -529,15 +531,15 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco
loginSvr.Init(claim.Phone)
// 判断是否高管
ok, _ := loginSvr.CheckIsSenior(claim.Phone, claim.CompanyId)
//ok, _ := loginSvr.CheckIsSenior(claim.Phone, claim.CompanyId)
rsp.Partner, _ = loginSvr.PartnerStaticInfo()
rsp.Manager, _ = loginSvr.ManagerStaticInfo()
if !ok { // 非高管普通用户
rsp.Partner.(map[string]interface{})["companys"] = rsp.Manager.(map[string]interface{})["companys"]
rsp.Manager.(map[string]interface{})["companys"] = []struct{}{}
}
//if !ok { // 非高管普通用户
// rsp.Partner.(map[string]interface{})["companys"] = rsp.Manager.(map[string]interface{})["companys"]
// rsp.Manager.(map[string]interface{})["companys"] = []struct{}{}
//}
if !loginSvr.HasAvailableCompany {
err = protocol.NewErrWithMessage(4140, err) //账号禁用
... ...