fix: cannot isolute mme radio info of multi-tenant
This commit is contained in:
@@ -752,7 +752,7 @@ func GetNBInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
//var nbInfo *TenantNBInfo
|
//var nbInfo *TenantNBInfo
|
||||||
_ = json.Unmarshal(resp.Body(), &response)
|
_ = json.Unmarshal(resp.Body(), &response)
|
||||||
for i := 0; i < len(response.Data); i++ {
|
for i := 0; i < len(response.Data); i++ {
|
||||||
where = fmt.Sprintf("status='1' and tenancy_type='RADIO' and tenancy_key='%s'", response.Data[i].ID)
|
where = fmt.Sprintf("status='1' and tenancy_type='RADIO' and tenancy_key='%v'", response.Data[i].ID)
|
||||||
tenantID, _ = dborm.XormGetSingleColStringByWhere("sys_tenant", "parent_id", where)
|
tenantID, _ = dborm.XormGetSingleColStringByWhere("sys_tenant", "parent_id", where)
|
||||||
where = fmt.Sprintf("status='1' and tenant_id='%s'", tenantID)
|
where = fmt.Sprintf("status='1' and tenant_id='%s'", tenantID)
|
||||||
tenantName, _ = dborm.XormGetSingleColStringByWhere("sys_tenant", "tenant_name", where)
|
tenantName, _ = dborm.XormGetSingleColStringByWhere("sys_tenant", "tenant_name", where)
|
||||||
@@ -766,7 +766,7 @@ func GetNBInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
var nbInfos NBInfoResponse
|
var nbInfos NBInfoResponse
|
||||||
var nbIDs []string
|
var nbIDs []string
|
||||||
// Get nodeB IDs by tenantID
|
// Get nodeB IDs by tenantID
|
||||||
where = fmt.Sprintf("status='1' and tenancy_type='RADIO' and parent_id='%s'", tenantID)
|
where = fmt.Sprintf("status='1' and tenancy_type='RADIO' and parent_id='%v'", tenantID)
|
||||||
dborm.XormFindColStringArrayByWhere("sys_tenant", "tenancy_key", where, &nbIDs)
|
dborm.XormFindColStringArrayByWhere("sys_tenant", "tenancy_key", where, &nbIDs)
|
||||||
_ = json.Unmarshal(resp.Body(), &nbInfos)
|
_ = json.Unmarshal(resp.Body(), &nbInfos)
|
||||||
for _, n := range nbInfos.Data {
|
for _, n := range nbInfos.Data {
|
||||||
|
|||||||
Reference in New Issue
Block a user