From c4a27ddd0f9abaf75329bc4f964d6350eb1696f8 Mon Sep 17 00:00:00 2001 From: simonzhangsz Date: Tue, 19 Nov 2024 15:12:09 +0800 Subject: [PATCH] fix: filter kpi_values is null of the custom kpi data --- features/pm/kpi_c_report/controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/pm/kpi_c_report/controller.go b/features/pm/kpi_c_report/controller.go index a19646b3..03f6ae22 100644 --- a/features/pm/kpi_c_report/controller.go +++ b/features/pm/kpi_c_report/controller.go @@ -47,6 +47,7 @@ func (k *KpiCReport) Get(c *gin.Context) { conditions = append(conditions, "(UNIX_TIMESTAMP(created_at) * 1000) <= ?") params = append(params, querys.EndTime) } + conditions = append(conditions, "kpi_values != 'null'") whereSql := "" if len(conditions) > 0 { @@ -113,6 +114,7 @@ func (k *KpiCReport) GetReport2FE(c *gin.Context) { conditions = append(conditions, "(UNIX_TIMESTAMP(created_at) * 1000) <= ?") params = append(params, querys.EndTime) } + conditions = append(conditions, "kpi_values != 'null'") whereSql := "" if len(conditions) > 0 { @@ -192,6 +194,7 @@ func (k *KpiCReport) GetTotalList(c *gin.Context) { conditions = append(conditions, "(UNIX_TIMESTAMP(created_at) * 1000) <= ?") params = append(params, querys.EndTime) } + conditions = append(conditions, "kpi_values != 'null'") whereSql := "" if len(conditions) > 0 { @@ -260,6 +263,7 @@ func (k *KpiCReport) Total(c *gin.Context) { conditions = append(conditions, "(UNIX_TIMESTAMP(created_at) * 1000) <= ?") params = append(params, querys.EndTime) } + conditions = append(conditions, "kpi_values != 'null'") whereSql := "" if len(conditions) > 0 {