fix: kpi support multiple upf for a tenant
This commit is contained in:
@@ -22,8 +22,13 @@ func (r *PerfKPIImpl) SelectGoldKPI(query model.GoldKPIQuery, kpiIds []string) [
|
||||
var params []any
|
||||
var tableName string = "kpi_report_"
|
||||
if query.RmUID != "" {
|
||||
conditions = append(conditions, "gk.rm_uid = ?")
|
||||
params = append(params, query.RmUID)
|
||||
rmUIDs := strings.Split(query.RmUID, ",")
|
||||
var rmUIDconditions []string
|
||||
for _, rmUID := range rmUIDs {
|
||||
rmUIDconditions = append(rmUIDconditions, "gk.rm_uid = ?")
|
||||
params = append(params, rmUID)
|
||||
}
|
||||
conditions = append(conditions, "("+strings.Join(rmUIDconditions, " or ")+")")
|
||||
}
|
||||
if query.NeType != "" {
|
||||
//conditions = append(conditions, "gk.ne_type = ?")
|
||||
|
||||
Reference in New Issue
Block a user