From fe715cd52c43aeb4134ce53f4631c4f639307b3e Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 9 Oct 2024 11:23:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/svc_data_center.go | 4 ++-- app/svc/svc_index.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/svc/svc_data_center.go b/app/svc/svc_data_center.go index 2704063..8da5671 100644 --- a/app/svc/svc_data_center.go +++ b/app/svc/svc_data_center.go @@ -444,7 +444,7 @@ func commAgentProfit(c *gin.Context, isTotal int, req md.DataCenterProfitRecordR where %s %s ` user := GetUser(c) - where := "uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) if req.AppId != "" || req.Platform != "" { where += " and app_id in(" + appId + ")" } @@ -542,7 +542,7 @@ func commAgent(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[s where %s ` user := GetUser(c) - whereAgent := "original_data_id in(" + strings.Join(ids, ",") + ") and agent_id=" + utils.IntToStr(user.AgentId) + whereAgent := "is_generate_report=1 and original_data_id in(" + strings.Join(ids, ",") + ") and agent_id=" + utils.IntToStr(user.AgentId) sqlAgent = fmt.Sprintf(sqlAgent, whereAgent) nativeStringAgent, _ := db.QueryNativeString(db.Db, sqlAgent) agentMap := make(map[string]map[string]string) diff --git a/app/svc/svc_index.go b/app/svc/svc_index.go index 6909d93..a7c04b0 100644 --- a/app/svc/svc_index.go +++ b/app/svc/svc_index.go @@ -167,7 +167,7 @@ func commTotalAgent(c *gin.Context, startDate, endDate string) []map[string]stri where %s ` user := GetUser(c) - where := "uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) if startDate != "" { where += " and date>='" + startDate + "'" }