作者 yangfu

增加:fix

... ... @@ -2,7 +2,6 @@ package domain_service
import (
"github.com/tiptok/gocomm/xa/eda"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/constant"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/dao"
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg/transaction"
... ... @@ -153,8 +152,8 @@ func (svr *PgLoginService) ManagerStaticInfo() (interface{}, error) {
return response, nil
}
var (
companyList []*domain.Company
adminApiGateway = http_gateway.NewHttplibBusinessAdminApiServiceGateway()
companyList []*domain.Company
//adminApiGateway = http_gateway.NewHttplibBusinessAdminApiServiceGateway()
)
doGetCompanyIds := func() []int64 {
var companies []int64
... ... @@ -169,21 +168,21 @@ func (svr *PgLoginService) ManagerStaticInfo() (interface{}, error) {
c := companyList[i]
//通过企业平台 校验模块权限
var user *domain.Users
for j := range svr.Users {
if svr.Users[j].CompanyId == c.Id {
user = svr.Users[j]
break
}
}
if user != nil {
if code, e := adminApiGateway.UserAuth(user.Id, constant.BUSINESS_ADMIN_PLATFORM_ID); e != nil || code != 0 {
log.Debug("【检查权限】", svr.Phone, "【公司】", c.Id, user.Id, code, e.Error())
continue
} else {
log.Debug("【检查权限】", svr.Phone, "【公司】", c.Id, user.Id, code, e)
}
}
//var user *domain.Users
//for j := range svr.Users {
// if svr.Users[j].CompanyId == c.Id {
// user = svr.Users[j]
// break
// }
//}
//if user != nil {
// if code, e := adminApiGateway.UserAuth(user.Id, constant.BUSINESS_ADMIN_PLATFORM_ID); e != nil || code != 0 {
// log.Debug("【检查权限】", svr.Phone, "【公司】", c.Id, user.Id, code, e.Error())
// continue
// } else {
// log.Debug("【检查权限】", svr.Phone, "【公司】", c.Id, user.Id, code, e)
// }
//}
item := newCompanyBase(c)
companys = append(companys, item)
}
... ...