diff --git a/app/svc/svc_data_center.go b/app/svc/svc_data_center.go index e511af2..2704063 100644 --- a/app/svc/svc_data_center.go +++ b/app/svc/svc_data_center.go @@ -27,7 +27,7 @@ func DataCenterRecordTotal(c *gin.Context, req md.DataCenterTableReq) md.DataCen where %s ` mediumId := GetAgentMediumId(c) - where := "uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" if req.AppId != "" || req.Platform != "" { where += " and app_id in(" + appId + ")" } @@ -164,7 +164,7 @@ func DataCenterCommissionRecordTotal(c *gin.Context, req md.DataCenterTableReq) where %s ` mediumId := GetAgentMediumId(c) - where := "uuid=" + c.GetString("mid") + where := "is_generate_report=1 and uuid=" + c.GetString("mid") if req.AppId != "" || req.Platform != "" { where += " and app_id in(" + appId + ")" } @@ -400,7 +400,7 @@ func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string where %s %s ` mediumId := GetAgentMediumId(c) - where := "uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" if req.AppId != "" || req.Platform != "" { where += " and app_id in(" + appId + ")" } @@ -496,7 +496,7 @@ func commAgent(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[s where %s %s ` mediumId := GetAgentMediumId(c) - where := "uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" if req.AppId != "" || req.Platform != "" { where += " and app_id in(" + appId + ")" } diff --git a/app/svc/svc_index.go b/app/svc/svc_index.go index 55f54ab..6909d93 100644 --- a/app/svc/svc_index.go +++ b/app/svc/svc_index.go @@ -141,7 +141,7 @@ func commTotal(c *gin.Context, startDate, endDate string) []map[string]string { where %s ` mediumId := GetAgentMediumId(c) - where := "uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" if startDate != "" { where += " and date>='" + startDate + "'" } @@ -198,7 +198,7 @@ func commTotalByApp(c *gin.Context, req md.IndexAppListReq, appId []string) []ma where %s group by app_id order by %s,id asc limit 20 ` mediumId := GetAgentMediumId(c) - where := "uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" if req.StartDate != "" { where += " and date>='" + req.StartDate + "'" } diff --git a/go.mod b/go.mod index c752657..cbfd343 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( ) require ( - code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240913063657-cd3094cf9822 + code.fnuoos.com/zhimeng/model.git v0.0.3-0.20241009031730-6c5d31eb7458 github.com/360EntSecGroup-Skylar/excelize v1.4.1 )