From 4f9ed3baaf1119b43e9d7148f1f1951e012c33af Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Thu, 20 Jun 2024 17:32:22 +0800 Subject: [PATCH] fix: cannot isolute mme radio info of multi-tenant --- features/ue/ue.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/ue/ue.go b/features/ue/ue.go index 4278befc..d9df8cda 100644 --- a/features/ue/ue.go +++ b/features/ue/ue.go @@ -752,7 +752,7 @@ func GetNBInfoFromNF(w http.ResponseWriter, r *http.Request) { //var nbInfo *TenantNBInfo _ = json.Unmarshal(resp.Body(), &response) 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) where = fmt.Sprintf("status='1' and tenant_id='%s'", tenantID) tenantName, _ = dborm.XormGetSingleColStringByWhere("sys_tenant", "tenant_name", where) @@ -766,7 +766,7 @@ func GetNBInfoFromNF(w http.ResponseWriter, r *http.Request) { var nbInfos NBInfoResponse var nbIDs []string // 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) _ = json.Unmarshal(resp.Body(), &nbInfos) for _, n := range nbInfos.Data {