...
|
...
|
@@ -450,8 +450,8 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
|
rsp.Partner, _ = loginSvr.PartnerStaticInfo()
|
|
|
rsp.Manager, _ = loginSvr.ManagerStaticInfo()
|
|
|
|
|
|
if !loginSvr.HasAvailableCompany {
|
|
|
err = protocol.NewErrWithMessage(10008) //账号禁用
|
|
|
if !loginSvr.HasAvailableCompany && !loginSvr.HasAvailableManagerCompany { // 判断合伙人或者高管是否有可访问的公司
|
|
|
err = protocol.NewErrWithMessage(10008) //账号禁用, 抱歉,企业管理员未帮您开通权限。如需访问,请联系企业管理员
|
|
|
return
|
|
|
}
|
|
|
|
...
|
...
|
@@ -481,14 +481,24 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom |
|
|
v = map[string]interface{}{"center": rsp}
|
|
|
} else {
|
|
|
var companies []interface{}
|
|
|
for _, company := range rsp.Manager.(map[string]interface{})["companys"].([]struct{}) {
|
|
|
companies = append(companies, company)
|
|
|
|
|
|
if rsp.Partner.(map[string]interface{})["companys"] != nil {
|
|
|
for _, company := range rsp.Partner.(map[string]interface{})["companys"].([]*domain_service.Company) {
|
|
|
companies = append(companies, company)
|
|
|
}
|
|
|
} else {
|
|
|
companies = []interface{}{}
|
|
|
}
|
|
|
for _, company := range rsp.Partner.(map[string]interface{})["companys"].([]*domain_service.Company) {
|
|
|
companies = append(companies, company)
|
|
|
|
|
|
if rsp.Manager.(map[string]interface{})["companys"] != nil {
|
|
|
for _, company := range rsp.Manager.(map[string]interface{})["companys"].([]struct{}) {
|
|
|
companies = append(companies, company)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
rsp.Partner.(map[string]interface{})["companys"] = companies
|
|
|
rsp.Manager.(map[string]interface{})["companys"] = []struct{}{}
|
|
|
|
|
|
v = map[string]interface{}{"center": rsp}
|
|
|
}
|
|
|
|
...
|
...
|
|